Table constructor
Table({
- required String name,
- required List<
TableColumn> resolvedColumns, - bool withoutRowId = false,
- bool isStrict = false,
- List<
TableConstraint> tableConstraints = const [], - TableInducingStatement? definition,
- bool isVirtual = false,
Constructs a table from the known name and resolvedColumns.
Implementation
Table({
required this.name,
required this.resolvedColumns,
this.withoutRowId = false,
this.isStrict = false,
this.tableConstraints = const [],
this.definition,
this.isVirtual = false,
}) {
for (final column in resolvedColumns) {
column.table = this;
if (_rowIdColumn == null) {
if (column is RowId) {
_rowIdColumn = column;
} else if (column.isAliasForRowId()) {
_rowIdColumn = column;
// By design, the rowid is non-nullable, even if there isn't a NOT NULL
// constraint set on the column definition.
column._type =
const ResolvedType(type: BasicType.int, nullable: false);
}
}
}
}