Sqlite class Null safety
An annotation used to specify how a field is serialized. Heavily inspired by JsonKey
- Implemented types
- columnType → Column?
In very exceptional circumstance, the SQLite column type can be declared. [...]
- defaultValue → String?
The value to use if the source's value is
null. This is often directly injected to the adapter, and wrapping is required for strings. (e.g.
defaultValue: "'Missing Last Name'") [...]final
- fromGenerator → String?
Manipulates output for the field in the deserialize generator.
The instance's field name is automatically defined. While the build method is ultimately
responsible for how the output is applied, it is most often directly injected as the
value of the field in the deserialize adapter. [...]
- hashCode → int
The hash code for this object. [...]
- ignore → bool
trueif the generator should ignore this field completely.final
- index → bool
INDEXon a single column. A
UNIQUEindex will be created when unique is
true. When unique is
trueand index is absent or
false, an index is not created. [...]final
- name → String?
The column name to use when reading and writing values corresponding
to the annotated fields. [...]
- nullable → bool
false, the column will be inserted as
NOT NULLand a value will be required in subsequent operations. Takes precedence over SqliteSerializable's
#nullable. Defaults to
- onDeleteCascade → bool
When true, deletion of the referenced record by
foreignTableNamethis record. For example, if the foreign table is "departments" and the local table is "employees," whenever that department is deleted, "employee" will be deleted. Defaults
- onDeleteSetDefault → bool
When true, deletion of a parent will set this table's referencing column to the default,
NULLunless otherwise declared. Defaults
- runtimeType → Type
A representation of the runtime type of the object.
- toGenerator → String?
Manipulates output for the field in the SqliteSerializeGenerator
The serializing key is defined from Sqlite or the default naming of the field. [...]
- unique → bool
true, the column will be inserted with a
UNIQUEconstraint. Unique columns will also be listed in the adapter for querying if implemented by the invoking provider. Defaults to
false. Does not apply to associations. [...]final