SqlTypeSystem class Null safety

Manages the set of SqlType known to a database. It's also responsible for returning the appropriate sql type for a given dart type.

Constructors

SqlTypeSystem(List<SqlType> types)
Constructs a SqlTypeSystem from the types.
const
factory
SqlTypeSystem.withDefaults()
Constructs a SqlTypeSystem from the default types.
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
types List<SqlType>
The mapping types maintained by this type system.
final

Methods

forDartType<T>() SqlType<T>
Returns the appropriate sql type for the dart type provided as the generic parameter.
@Deprecated('Use mapToVariable or a mapFromSql method instead')
mapToVariable(Object? dart) Object?
Maps a Dart object to a (possibly simpler) object that can be used as parameters to raw sql queries.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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

Static Methods

mapToSqlConstant(Object? dart) String
Maps a Dart object to a SQL constant representing the same value.

Constants

defaultInstance → const SqlTypeSystem
Constant field of SqlTypeSystem.withDefaults. This field exists as a workaround for an analyzer bug: https://dartbug.com/38658 [...]
SqlTypeSystem.withDefaults()