PostgresSchemaGrammar class final
PostgreSQL DDL grammar.
- Inheritance
-
- Object
- SchemaGrammar
- PostgresSchemaGrammar
Constructors
- PostgresSchemaGrammar()
-
The PostgreSQL schema grammar.
const
Properties
- autoIncrementClause → String
-
Clause appended to an auto-increment column (after the type).
no setteroverride
- createSuffix → String
-
Text appended to
CREATE TABLE, such as MySQL's engine and charset.no setterinherited - dialect → SqlDialect
-
The database dialect this grammar writes for.
no setteroverride
- enumAsCheck → bool
-
Whether enum columns need a CHECK constraint.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- inlineUnique → bool
-
Whether inline
UNIQUEon a column is used (else a unique index).no setterinherited - quoteClose → String
-
The character that closes a quoted identifier.
no setterinherited
- quoteOpen → String
-
The character that opens a quoted identifier:
", or a backtick on MySQL.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skipsVectorIndex → bool
-
Whether compileVectorIndex gives a statement. Without it a vector index
is left out, as SQLite does, or refused, as MySQL does.
no setterinherited
- supportsUnsigned → bool
-
Whether
UNSIGNEDis supported.no setterinherited
Methods
-
columnIndexes(
Blueprint blueprint) → List< IndexDefinition> -
Indexes implied by
.index()/.unique()column modifiers.inherited -
columnInfo(
Map< String, Object?> row) → ColumnInfo -
Normalizes a raw column row from compileColumns.
override
-
compileAlter(
Blueprint blueprint) → List< String> -
ALTER statements for
blueprint(PostgreSQL/MySQL style; SQLite uses SqliteTableRebuilder when needed).inherited -
compileChange(
String table, ColumnDefinition column) → List< String> -
Statements altering an existing column to match
column.override -
compileColumn(
ColumnDefinition column) → String -
name TYPE [NULL|NOT NULL] [DEFAULT ...] [UNIQUE] [PRIMARY KEY].inherited -
compileColumns(
) → String -
Query returning raw column rows of a table (tableBindings).
override
-
compileCreate(
Blueprint blueprint) → List< String> -
The statements creating
blueprint's table and its indexes.inherited -
compileDrop(
String table) → String -
DROP TABLEforSchema.drop.override -
compileDropForeign(
String table, String name) → String -
Drops the foreign key
nameoftable.inherited -
compileDropIfExists(
String table) → String -
DROP TABLE IF EXISTSforSchema.dropIfExists.override -
compileDropIndex(
String table, String name) → String -
Drops the index
nameoftable.inherited -
compileForeignClause(
String table, ForeignKeyDefinition key) → String -
Inline
CONSTRAINT ... FOREIGN KEYclause.inherited -
compileIndex(
String table, IndexDefinition index) → String -
CREATE [UNIQUE] INDEXforindexontable.inherited -
compileListTables(
) → String -
Query listing user table names (column
name).override -
compilePrimaryKey(
IndexDefinition key) → String -
The table constraint of a composite primary
keyinCREATE TABLE:CONSTRAINT <name> PRIMARY KEY (...).inherited -
compileRename(
String from, String to) → String -
ALTER TABLE ... RENAME TO ...forSchema.rename.inherited -
compileTableExists(
) → String -
Query returning one row when the table exists (tableBindings).
override
-
compileVectorIndex(
String table, IndexDefinition index) → String -
The statement creating a vector
index; dialects with one override it.override -
compileViewExists(
) → String -
Query returning one row when the view exists (tableBindings).
override
-
defaultClause(
ColumnDefinition column) → String -
The
DEFAULTclause ofcolumn, or an empty string without one.inherited -
literal(
Object? value) → String -
valueas a SQL literal in aDEFAULTclause: strings quoted with quotes doubled, booleans as1or0.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
tableBindings(
String table) → List< Object?> -
The bindings of compileTableExists, compileViewExists and
compileColumns for
table.override -
toString(
) → String -
A string representation of this object.
inherited
-
typeFor(
ColumnDefinition column) → String -
SQL type for
column.override -
wrap(
String identifier) → String -
Quotes an identifier after validating its characters (never trusts
input: an invalid identifier throws instead of being interpolated).
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited