BuildGeneralColumn<T extends Object> extension
Column builders available for both virtual and non-virtual columns.
- on
-
- _BaseColumnBuilder<
T>
- _BaseColumnBuilder<
Methods
-
call(
) → Column< T> -
Available on _BaseColumnBuilder<
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.T> , provided by the BuildGeneralColumn extension -
map<
Dart> (TypeConverter< Dart, T?> converter) → ColumnBuilder<T> -
Available on _BaseColumnBuilder<
Uses a customT> , provided by the BuildGeneralColumn extensionconverter
to store custom Dart objects in a single column and automatically mapping them from and to sql. -
named(
String name) → ColumnBuilder< T> -
Available on _BaseColumnBuilder<
By default, the field name will be used as the column name, e.g.T> , provided by the BuildGeneralColumn extensionIntColumn 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 likeIntColumn get id = integer((c) => c.named('user_id'))
. -
nullable(
) → ColumnBuilder< T> -
Available on _BaseColumnBuilder<
Marks this column as nullable. Nullable columns should not appear in a primary key. Columns are non-null by default.T> , provided by the BuildGeneralColumn extension -
unique(
) → ColumnBuilder< T> -
Available on _BaseColumnBuilder<
Adds UNIQUE constraint to column.T> , provided by the BuildGeneralColumn extension