CreateTableSQL class

A CREATE TABLE SQL builder.

Inheritance

Constructors

CreateTableSQL(SQLDialect dialect, String table, List<SQLEntry> entries, {String q = '"', List<CreateIndexSQL>? indexes, List<AlterTableSQL>? alterTables, List<CreateTableSQL>? relationships, String? parentTable, EntityRepository<Object>? entityRepository})

Properties

allSQLBuilders List<SQLBuilder>
All the SQLs of this builder tree node.
no setterinherited
alterTables List<AlterTableSQL>?
The related ALTER TABLE SQLs.
getter/setter pair
constraints List<SQLEntry>
Returns the CONSTRAINT entries.
no setter
dependentTables List<String>
Returns a list of dependent tables, usually referenced tables.
no setteroverride
dialect SQLDialect
The SQL dialect.
finalinherited
entityRepository EntityRepository<Object>?
The associated EntityRepository of this table.
getter/setter pair
entries List<SQLEntry>
The fields and constraint entries.
finalinherited
extraSQLBuilders List<SQLBuilder>
Some extra SQL related to this SQL.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
indexes List<CreateIndexSQL>?
The related CREATE INDEX SQLs.
getter/setter pair
mainTable String
The main table of the SQL.
no setterinherited
parentTable String?
The parent table;
finalinherited
q String
The quote of the dialect.
finalinherited
referenceAndRelationshipTables List<String>
Returns the tables in referenceTables and relationshipsTables.
no setter
referenceTables List<String>
Returns a list of referenced tables.
no setteroverride
referenceTablesLength int
Returns a number of referenced tables.
no setterinherited
relationships List<CreateTableSQL>?
The related CREATE TABLE SQLs for relationships.
getter/setter pair
relationshipsTables List<String>
Returns the tables of the relationships.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
table String
The table name.
finalinherited

Methods

buildAllSQLs({bool multiline = true, bool ifNotExists = true}) List<String>
Build all the SQLs, including the extraSQLBuilders.
inherited
buildSQL({bool multiline = true, bool ifNotExists = true}) String
Build the SQL.
override
compareTo(SQLBuilder other) int
Compares this object to another object.
override
constraintsAsAlterTable({bool recursive = true, bool onlyDependents = true}) List<AlterTableSQL>
Converts the constraints to AlterTableSQL. This helps to execute the dependente constraints.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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