SqlTypes class Null safety

Database-specific helper methods mapping Dart values from and to SQL variables or literals.

Annotations
  • @sealed

Constructors

SqlTypes(bool storeDateTimesAsText, [SqlDialect _dialect = SqlDialect.sqlite])
Creates an SqlTypes mapper from the provided options.
const

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
storeDateTimesAsText bool
Whether these type mappings have been configured to store date time values as text.
final

Methods

mapToSqlLiteral(Object? dart) String
Maps the dart value into a SQL literal that can be embedded in SQL queries.
mapToSqlVariable(Object? dartValue) Object?
Maps a Dart object to a (possibly simpler) object that can be used as a parameter in raw sql queries.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
read<T extends Object>(DriftSqlType<T> type, Object? sqlValue) → T?
Maps a raw sqlValue to Dart given its sql type.
toString() String
A string representation of this object.
inherited

Operators

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