DriftSqlType<T extends Object> enum

An enumation of type mappings that are builtin to drift and drift_dev.





bool → const DriftSqlType<bool>

A boolean type, represented as 0 or 1 (int) in SQL.

string → const DriftSqlType<String>

A textual type, represented as TEXT in sqlite.

bigInt → const DriftSqlType<BigInt>

A 64-bit int type that is represented a BigInt in Dart for better compatibility with the web. Represented as an INTEGER in sqlite or as a bigint in postgres.

int → const DriftSqlType<int>

A 64-bit int.

Represented as an INTEGER in sqlite or as a bigint in postgres.

dateTime → const DriftSqlType<DateTime>

A DateTime value.

Depending on the options choosen at build-time, this is either stored as an unix timestamp (the default) or as a ISO 8601 string.

blob → const DriftSqlType<Uint8List>

A Uint8List value.

This is stored as a BLOB in sqlite or as a bytea type in postgres.

double → const DriftSqlType<double>

A double value, stored as a REAL type in sqlite.

any → const DriftSqlType<DriftAny>

The drift type for columns declared as ANY in STRICT tables.


hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
sqlTypeName(GenerationContext context) String
Returns a suitable representation of this type in SQL.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.

Static Methods

forNullableType<Dart>() DriftSqlType<Object>
A variant of forType that also works for nullable Dart types.
forType<Dart extends Object>() DriftSqlType<Dart>
Attempts to find a suitable SQL type for the Dart type passed to this method.


values → const List<DriftSqlType<Object>>
A constant List of the values in this enum, in order of their declaration.