VersionedTable constructor

VersionedTable({
  1. required String entityName,
  2. required bool isStrict,
  3. required bool withoutRowId,
  4. required DatabaseConnectionUser attachedDatabase,
  5. required List<GeneratedColumn<Object> Function(String)> columns,
  6. required List<String> tableConstraints,
  7. String? alias,
})

Create a table from the individual fields.

columns is a list of functions returning a GeneratedColumn when given the alias (or original name) of this table.

Implementation

VersionedTable({
  required this.entityName,
  required this.isStrict,
  required this.withoutRowId,
  required this.attachedDatabase,
  required List<GeneratedColumn Function(String)> columns,
  required List<String> tableConstraints,
  String? alias,
})  : _columnFactories = columns,
      customConstraints = tableConstraints,
      $columns = [for (final column in columns) column(alias ?? entityName)],
      _alias = alias;