PostgresSchemaGrammar class final

PostgreSQL DDL grammar.

Inheritance

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 UNIQUE on 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 UNSIGNED is 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 TABLE for Schema.drop.
override
compileDropForeign(String table, String name) → String
Drops the foreign key name of table.
inherited
compileDropIfExists(String table) → String
DROP TABLE IF EXISTS for Schema.dropIfExists.
override
compileDropIndex(String table, String name) → String
Drops the index name of table.
inherited
compileForeignClause(String table, ForeignKeyDefinition key) → String
Inline CONSTRAINT ... FOREIGN KEY clause.
inherited
compileIndex(String table, IndexDefinition index) → String
CREATE [UNIQUE] INDEX for index on table.
inherited
compileListTables() → String
Query listing user table names (column name).
override
compilePrimaryKey(IndexDefinition key) → String
The table constraint of a composite primary key in CREATE TABLE: CONSTRAINT <name> PRIMARY KEY (...).
inherited
compileRename(String from, String to) → String
ALTER TABLE ... RENAME TO ... for Schema.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 DEFAULT clause of column, or an empty string without one.
inherited
literal(Object? value) → String
value as a SQL literal in a DEFAULT clause: strings quoted with quotes doubled, booleans as 1 or 0.
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