SchemaTable class Null safety

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.
read-only
hasForeignKeyInUniqueSet bool
read-only
hashCode int
The hash code for this object.
read-onlyinherited
name String?
The name of the database table.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
schema Schema?
The Schema this table belongs to.
read / write
uniqueColumnSet List<String>?
The names of a set of columns that must be unique for each row in this table.
read / write

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 non-existent 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.