Skip to main content

Module dialect

Module dialect 

Source
Expand description

What differs between one SQL database and another.

The query builder, the schema builder and the migrator are written once; a Dialect supplies the handful of things the databases genuinely disagree about — how an identifier is quoted, what a bound parameter looks like, what a column type is called, and how a generated key is read back.

Everything a dialect answers is pure string generation, so all three are tested without a database anywhere near them.

Structs§

MySql
Postgres
SqlServer

Enums§

ColumnType
A column type as the schema builder thinks of it, before any database has had an opinion.
ReturningStyle
How a database hands back the key it generated for an inserted row.

Traits§

Dialect
The differences between one SQL database and another.

Functions§

by_name
Build a dialect from its name.
quote_qualified
Quote a possibly-qualified name one part at a time.
validate_identifier
Reject anything that is not a plain identifier.