SqlTypes class final

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

Constructors

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

Properties

dialect SqlDialect
The SqlDialect to consider when mapping values from and to Dart.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
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 nonexistent method or property is accessed.
inherited
read<T extends Object>(BaseSqlType<T> type, Object? sqlValue) → T?
Maps a raw sqlValue to Dart given its sql type (typically a DriftSqlType).
toString() String
A string representation of this object.
inherited

Operators

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