Column<T> class
final
Physical column metadata coupled to the Dart/storage Codec.
This value is usable without generated models or a connection. Schema and migration validation enforce combinations such as generated identities, nullability, defaults, and engine-specific storage limits.
Constructors
-
Column(String name, Codec<
T> codec, {bool nullable = false, bool generated = false, String? defaultSql, ComputedColumn? computed, T clientDefault()?, int? integerBits, int? decimalPrecision, int? decimalScale, int? temporalPrecision}) -
Describes one physical column without creating or validating a database.
const
Properties
- clientDefault → T Function()?
-
Called once for an omitted value when constructing an insert. Prepared
mutations retain that value; compilation and updates never call this.
final
-
codec
→ Codec<
T> -
Typed conversion used for stored values and selected results.
final
- computed → ComputedColumn?
-
Database-generated expression; computed columns are excluded from writes.
final
- decimalPrecision → int?
-
Optional decimal column precision, separate from expression result types.
final
- decimalScale → int?
-
Optional decimal column scale, paired with decimalPrecision.
final
- defaultSql → String?
-
Trusted SQL default expression used when an insert omits this column.
final
- generated → bool
-
Whether the database supplies an integer primary-key identity.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- integerBits → int?
-
Signed integer storage width (16, 32 or 64). The default is 64.
This describes the column, not the result width of SQL arithmetic.
final
- name → String
-
Physical SQL name, quoted as an identifier when SQL is rendered.
final
- nullable → bool
-
Whether the physical column permits SQL NULL.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- temporalPrecision → int?
-
Optional fractional second precision, from 0 through 6.
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