Table class

Represents a database table schema, including its columns, indexes, and foreign keys.

Available extensions

Constructors

Table({required String name, required List<Column> columns, List<Index> indexes = const [], List<ForeignKey> foreignKeys = const []})
Creates a new Table definition.

Properties

columns List<Column>
The list of columns in the table.
final
foreignKeys List<ForeignKey>
Optional list of foreign keys defined in the table.
final
hashCode int
The hash code for this object.
no setterinherited
indexes List<Index>
Optional list of indexes on the table.
final
name String
The name of the table.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fetchSchema() Future<Table?>

Available on Table, provided by the TableSQL extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toCreateSQL() String

Available on Table, provided by the TableSQL extension

toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited