SchemaBuilder class

Used during migration to modify a schema.

Constructors

SchemaBuilder(PersistentStore store, Schema inputSchema, { bool isTemporary: false })
Creates a builder starting from an existing schema.
SchemaBuilder.toSchema(PersistentStore store, Schema targetSchema, { bool isTemporary: false })
Creates a builder starting from the empty schema.

Properties

commands List<String>
A list of SQL commands generated by operations performed on this builder.
read / write
inputSchema Schema
The starting schema of this builder.
read / write
isTemporary bool
Whether or not this builder should create temporary tables.
read / write
schema Schema
The resulting schema of this builder as operations are applied to it.
read / write
store PersistentStore
The persistent store to validate and construct operations.
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

Methods

addColumn(String tableName, SchemaColumn column, { String unencodedInitialValue }) → void
Validates and adds a column to a table in schema.
alterColumn(String tableName, String columnName, void modify(SchemaColumn targetColumn), { String unencodedInitialValue }) → void
Validates and alters a column in a table in schema. [...]
alterTable(String tableName, void modify(SchemaTable targetTable)) → void
createTable(SchemaTable table) → void
Validates and adds a table to schema.
deleteColumn(String tableName, String columnName) → void
Validates and deletes a column in a table in schema.
deleteTable(String tableName) → void
Validates and deletes a table in schema.
renameColumn(String tableName, String columnName, String newName) → void
Validates and renames a column in a table in schema.
renameTable(String currentTableName, String newName) → void
Validates and renames a table in schema.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited