SqlField<TIn, TOut> class

Use this annotation to mark model property as needed to be stored in Sqlite storage; More over, Use can specify some additional fields using the SqlEntityDefinition.fields property, if you want to save not only model fields (see more details in SqlField)

Constructors

SqlField({required String fieldName, SqlFieldType fieldType = SqlFieldType.text, bool isPrimaryKey = false, bool isAutoIncrement = false, String? defaultValueExpression, DataConverter<TIn, TOut>? fromRawData, DataConverter<TIn, TOut>? toRawData})
const

Properties

defaultValueExpression String?
final
fieldName String
This name will be used to create column name for current model property in resulting table
final
fieldType SqlFieldType
Sqlite field type. If you omit the field type TEXT will be used by default
final
fromRawData DataConverter<TIn, TOut>?
Converted function used to transform Sqlite data to Dart Type
final
hashCode int
The hash code for this object.
no setterinherited
isAutoIncrement bool
This field used to mark field as auto incremented
final
isPrimaryKey bool
Column primary key You can use this field to mark several fields to create compound key used for creation the unique primary key in resulting table PRIMARY KEY(column_1,column_2,...)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toRawData DataConverter<TIn, TOut>?
Converted function used to transform Dart Type to Sqlite data
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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