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
name → String

The name of the database table.

read / write
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
hashCode → int

The hash code for this object.

read-only, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator [](String columnName) SchemaColumn

Returns a SchemaColumn in this instance by its name.

operator ==(other) → bool

The equality operator.

inherited

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.

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

Returns a string representation of this object.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited