Repository navigation
Mise Dialects
Mise supports five database runtimes. Each supplies builders, identifier quoting, and paging syntax. Choose matching mappings and builders; literal SQL expressions still need to be valid for your database.
| Database | Query builder | Command builder | Identifier quotes |
|---|---|---|---|
| SQL Server | SqlServerQueryBuilder |
SqlServerCommandBuilder |
[name] |
| PostgreSQL | PostgreSqlQueryBuilder |
PostgreSqlCommandBuilder |
"name" |
| SQLite | SqliteQueryBuilder |
SqliteCommandBuilder |
"name" |
| MySQL | MySqlQueryBuilder |
MySqlCommandBuilder |
Backticks |
| MariaDB | MariaDbQueryBuilder |
MariaDbCommandBuilder |
Backticks |
Generated table and column constants already use these quotes. QuoteIdentifier quotes one identifier; a qualified name needs separately quoted segments. Do not pass a generated qualified column constant to a method expecting a plain column name, such as Returning.
| Feature | SQL Server | PostgreSQL | SQLite | MySQL | MariaDB |
|---|---|---|---|---|---|
| Mapping qualifier | Schema | Schema | None | Database | Database |
| Paging | OFFSET/FETCH | LIMIT/OFFSET | LIMIT/OFFSET | LIMIT/OFFSET | LIMIT/OFFSET |
| ORDER BY required for paging | Yes | No | No | No | No |
| RIGHT/FULL JOIN | Both | Both | Both on 3.39+ | RIGHT only | RIGHT only |
| Recursive WITH keyword | WITH | WITH RECURSIVE | WITH RECURSIVE | WITH RECURSIVE | WITH RECURSIVE |
| INSERT output | OUTPUT INSERTED | RETURNING | RETURNING on 3.35+ | Separate last-ID query | RETURNING on 10.5+ |
| UPDATE output | OUTPUT INSERTED | RETURNING | RETURNING on 3.35+ | No fluent output | No fluent output |
| DELETE output | No fluent output | RETURNING | RETURNING on 3.35+ | No fluent output | RETURNING |
SQL Server's limit must be positive. SQLite supports an offset without a limit by emitting LIMIT -1. Set operations and recursion can have additional server-version requirements; builders do not negotiate server capabilities by connecting to the database.
PostgreSQL mappings use case-sensitive identifier comparison. SQL Server, SQLite, MySQL, and MariaDB mapping checks use case-insensitive comparison. This affects duplicate mapping names and the result columns a generated row can bind.
The generator's comparison rules do not change a server's collation or filesystem-related table naming behavior. Keep names consistent between your schema, projections, and mapping attributes.
Aggregate and scalar result types can differ between databases. PostgreSQL COUNT(*) returns a 64-bit integer, while SQL Server uses COUNT_BIG(*) for that shape. Scalar terminals cast the provider value to T; choose an exact compatible type.
MySQL and MariaDB use MySqlConnector. The other runtimes use their corresponding ADO.NET provider. See Database setup.
QueryBuilder and CommandBuilder accept a SqlDialect; their parameterless constructors use AnsiSqlDialect. A dialect exposes its name, RIGHT/FULL JOIN support, recursive-keyword behavior, paging requirements, QuoteIdentifier, and AppendPaging.
When composing builders, use the same engine throughout. Dialect-specific features such as OutputInserted and SQL Server MaxRecursion remain methods on the concrete runtime builder.
See Paging and ordering, Common table expressions, and Returned rows.
- Home
- Getting started
-
Package guides
- Partie
- Expo
-
Mise
- Database setup
- Table mappings
- Aliases
- Relationships
- Result rows
- SQL interpolation
- Queries
- Filtering
- Joins
- Aggregation
- Paging and ordering
- Subqueries
- Set operations
- Common table expressions
- Readers
- Streaming
- Writers
- Inserts
- Updates
- Deletes
- Returned rows
- Custom SQL and procedures
- Transactions
- Resource lifetimes
- Database dialects
- Diagnostics
- Integrations
- Recipes
- Reference
- Troubleshooting
- Development