Table<KeyType> constructor
Table<KeyType> ({})
Implementation
Table({
required this.columns,
required this.name,
this.childJoins = const [],
this.groupProperties = const [],
this.additionalSql = "",
this.withoutRowId = false,
}) : primaryKey = columns.whereType<IntoPrimaryKey>().firstOrNull?.toKey() ?? RowIdKey() {
switch (primaryKey) {
case SingleColumnKey primaryKey:
assert(columns.contains(primaryKey.column), 'Single Primary key must be subset of columns');
break;
default:
}
}