SQL dialect.
Different database systems may support a slightly different syntax for some queries, support different types or have specifc functions not avaialable in others.
To make drift able to generate code for each dialect, a DriftDialect implementation has full control over the way high-level drift structures are mapped to SQL.
Dialect implementations are provided in different packages: drift_sqlite
for SQLite, drift_postgres for PostgreSQL and drift_mariadb for MariaDB
and MySQL.
This class implements TypeProvider, which is responsible for mapping values between Dart and SQL. Via createCompiler, it's also responsible for returning a visitor generating SQL for drift statements and expressions.
- Implemented types
Properties
-
boolType
→ PhysicalSqlType<
bool> -
Returns a type implementation suitable for storing boolean values.
no setterinherited
-
byteArrayType
→ PhysicalSqlType<
Uint8List> -
Returns a type implementation suitable for storing byte arrays without a
length restriction.
no setterinherited
-
dateTimeType
→ PhysicalSqlType<
DateTime> -
Returns a type implementation suitable for storing DateTime values.
no setterinherited
-
doubleType
→ PhysicalSqlType<
double> -
Returns a type implementation suitable for storing double values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
int64Type
→ PhysicalSqlType<
BigInt> -
Returns a type implementation suitable for storing 64-bit signed integers
that are represented as a BigInt in Dart.
no setterinherited
-
intType
→ PhysicalSqlType<
int> -
Returns a type implementation suitable for storing 64-bit signed integers.
no setterinherited
-
jsonType
→ PhysicalSqlType<
DatabaseJson> -
Returns a type implementation suitable for storing JSON values.
no setterinherited
- known → KnownSqlDialect?
-
If this dialect is listed in KnownSqlDialect, returns the dialect
matching this one.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- supportsIndexedParameters → bool
-
Whether this dialect supports indexed parameters.
no setter
-
textType
→ PhysicalSqlType<
String> -
Returns a type implementation suitable for storing UTF-8 texts without
length restrictions.
no setterinherited
Methods
-
compile(
SqlComponent component) → StatementInfo - Compiles the component with a compiler for this dialect.
-
createCompiler(
) → StatementCompiler - Creates a StatementCompiler implementation generating SQL for this dialect.
-
desugarDuplicateVariables(
List< Variable< original, List<Object> >int> syntacticOccurences) → List<Variable< Object> > - For dialects that don't support named or explicitly-indexed variables, translates a variable assignment to avoid using that feature.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited