SchemaGrammar class abstract

Turns a Blueprint into DDL for one dialect. The defaults here are the ANSI-ish subset SQLite and PostgreSQL share; adapters override type names, literals and the catalogue queries.

Implementers

Constructors

SchemaGrammar()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

boolLiteral(bool value) String
How a bool default is written.
compileAlter(Blueprint blueprint) List<String>
One statement per added column, column index and command.
compileColumn(ColumnDefinition column) String
compileColumnListing(String table) Compiled
(sql, bindings) returning a name column per column of table.
compileCommand(String table, SchemaCommand command) String
compileCreate(Blueprint blueprint) List<String>
One CREATE TABLE followed by a CREATE INDEX per index.
compileDefault(Object? value) String
compileDrop(String table) String
compileDropIfExists(String table) String
compileIndex(String table, IndexCommand index) String
compileRename(String from, String to) String
compileTableExists() Compiled
(sql, bindings) selecting one row when the bound table name exists.
compileTableListing() String
SQL selecting every user table name in the database (one column, no bindings) — used by Schema.dropAllTables.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
typeFor(ColumnDefinition column) String
The SQL type for column.
wrap(String identifier) String
Double-quotes an identifier (each dotted segment separately).

Operators

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