ColumnDefinition<T> class
final
Typed source syntax for a stored column, interpreted by static generation.
Helpers such as integer and text provide the Dart value type. This object does not encode values, execute SQL or expose runtime constraint metadata.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
computed(
String expression, {String? sqlite, String? postgres, String? mysql, String? mariadb, ComputedStorage storage = ComputedStorage.stored}) → ColumnDefinition< T> - Computes the value in the database and excludes it from generated writes. Expressions are trusted SQL using physical column names, never parameters. Computed columns cannot also declare identity or insert defaults.
-
identity(
) → ColumnDefinition< T> - Uses an integer-storage domain codec as a database-generated primary key. The column must be non-nullable and be the table's only primary-key field.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
nullable(
{T? clientDefault()?}) → ColumnDefinition< T?> -
Permits SQL NULL and generates a nullable Dart field.
clientDefaultmay return null and runs only for omitted insert values. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited