Table of Contents

Class MySqlDialect

Namespace
eQuantic.Core.Data.MySql
Assembly
eQuantic.Core.Data.MySql.dll

MySQL's SQL flavour: snake_case naming, backtick identifiers, LIMIT/OFFSET, row-wise tuple comparisons, and AUTO_INCREMENT keys — which MySQL cannot read back from an insert (no RETURNING), so generated-key backfill is rejected with guidance: declare a client-generated key. Collection columns do not exist; collection clauses degrade to the gated client-side residual.

public class MySqlDialect : SqlDialect
Inheritance
MySqlDialect
Derived
Inherited Members

Properties

GeneratedKeyDdl

The DDL column suffix declaring a database-generated key (e.g. GENERATED BY DEFAULT AS IDENTITY).

public override string GeneratedKeyDdl { get; }

Property Value

string

System

The OpenTelemetry db.system value (e.g. postgresql, mysql, mssql).

public override string System { get; }

Property Value

string

Methods

AlterColumnType(string, string, string)

The DDL altering a column's type (a dialect may need a cast clause).

public override string AlterColumnType(string quotedTable, string quotedColumn, string sqlType)

Parameters

quotedTable string
quotedColumn string
sqlType string

Returns

string

BindValue(object?)

Converts a value before binding (a dialect may need CLR-side coercion, e.g. arrays); identity by default.

public override object? BindValue(object? value)

Parameters

value object

Returns

object

CreateIndexSql(string, string, string, bool, IndexMethod, string?)

The DDL creating an index with a structure and an optional filtered predicate (already rendered as a SQL fragment with inlined literals). The base dialect builds default-structure indexes, filtered or not; a method it has no structure for is rejected with guidance.

public override string CreateIndexSql(string quotedName, string quotedTable, string columns, bool unique, IndexMethod method, string? filter)

Parameters

quotedName string

The quoted index name.

quotedTable string

The quoted table.

columns string

The rendered key column list.

unique bool

Whether the index enforces uniqueness.

method IndexMethod

The index structure.

filter string

The rendered partial-index predicate, or null.

Returns

string

Quote(string)

Quotes an identifier (table or column name).

public override string Quote(string identifier)

Parameters

identifier string

Returns

string

SqlType(Type)

The DDL type for a CLR type (used by CREATE TABLE migrations).

public override string SqlType(Type type)

Parameters

type Type

Returns

string

TupleComparison(IReadOnlyList<string>, ComparisonOperator, IReadOnlyList<string>)

Renders a row-wise tuple comparison; the base dialect cannot express it.

public override string TupleComparison(IReadOnlyList<string> columns, ComparisonOperator op, IReadOnlyList<string> parameters)

Parameters

columns IReadOnlyList<string>

The quoted columns.

op ComparisonOperator

The comparison operator.

parameters IReadOnlyList<string>

The bound values' parameter markers.

Returns

string