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.

Available extensions

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

bind(T value) SqlValue<T>

Available on Column<T>, provided by the ColumnSql extension

Encodes a bound value using this column's domain type.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
result({String? as}) ResultColumn<T>

Available on Column<T>, provided by the ColumnSql extension

Describes a result label without inheriting physical column constraints.
toString() String
A string representation of this object.
inherited

Operators

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