BuildColumn<T> extension Null safety

DSL extension to define a column inside a drift table.



call() Column<T>
Turns this column builder into a column. This method won't actually be called in your code. Instead, the generator will take a look at your source code to figure out your table structure.
clientDefault(T onInsert()) ColumnBuilder<T>
Sets a dynamic default value for this column. [...]
customConstraint(String constraint) ColumnBuilder<T>
Tells drift to write a custom constraint after this column definition when writing this column, for instance in a CREATE TABLE statement. [...]
map<Dart>(TypeConverter<Dart, T> converter) ColumnBuilder<T>
Uses a custom converter to store custom Dart objects in a single column and automatically mapping them from and to sql. [...]
named(String name) ColumnBuilder<T>
By default, the field name will be used as the column name, e.g. IntColumn get id = integer() will have "id" as its associated name. Columns made up of multiple words are expected to be in camelCase and will be converted to snake_case (e.g. a getter called accountCreationDate will result in an SQL column called account_creation_date). To change this default behavior, use something like IntColumn get id = integer((c) => c.named('user_id')). [...]
nullable() ColumnBuilder<T?>
Marks this column as nullable. Nullable columns should not appear in a primary key. Columns are non-null by default.
withDefault(Expression<T> e) ColumnBuilder<T>
The column will use this expression when a row is inserted and no value has been specified. [...]