SchemaTable class

A portable representation of a database table.

Instances of this type contain the database-only details of a ManagedEntity. See also Schema.

Constructors

SchemaTable(String? name, List<SchemaColumn> columns, {List<String>? uniqueColumnSetNames})
Creates an instance of this type with a name, columns and uniqueColumnSetNames.
SchemaTable.empty()
Creates an empty table.
SchemaTable.from(SchemaTable otherTable)
Creates a deep copy of otherTable.
SchemaTable.fromEntity(ManagedEntity entity)
Creates an instance of this type to mirror entity.
SchemaTable.fromMap(Map<String, dynamic> map)
Creates an instance of this type from map.

Properties

columns List<SchemaColumn>
An unmodifiable list of SchemaColumns in this table.
no setter
hasForeignKeyInUniqueSet bool
no setter
hashCode int
The hash code for this object.
no setterinherited
name String?
The name of the database table.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema Schema?
The Schema this table belongs to.
getter/setter pair
uniqueColumnSet List<String>?
The names of a set of columns that must be unique for each row in this table.
getter/setter pair

Methods

addColumn(SchemaColumn column) → void
Adds column to this table.
asMap() Map<String, dynamic>
Returns portable representation of this table.
columnForName(String name) SchemaColumn?
Returns a SchemaColumn with name.
differenceFrom(SchemaTable table) SchemaTableDifference
The differences between two tables.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeColumn(SchemaColumn column) → void
Removes column from this table.
renameColumn(SchemaColumn column, String? newName) → void
replaceColumn(SchemaColumn existingColumn, SchemaColumn newColumn) → void
Replaces existingColumn with newColumn in this table.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String columnName) SchemaColumn?
Returns a SchemaColumn in this instance by its name.