DriftSqlType<T extends Object>
enum
An enumation of type mappings that are builtin to drift and drift_dev
.
Values
-
bool
→ const DriftSqlType<
bool> -
A boolean type, represented as
0
or1
(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 abigint
in postgres. -
int
→ const DriftSqlType<
int> -
A 64-bit int.
Represented as an
INTEGER
in sqlite or as abigint
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 abytea
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.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sqlTypeName(
GenerationContext context) → String - Returns a suitable representation of this type in SQL.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
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.
Constants
-
values
→ const List<
DriftSqlType< Object> > - A constant List of the values in this enum, in order of their declaration.