Grammar class abstract
Turns a QueryBuilder into SQL for one dialect. The ANSI defaults here cover SQLite and PostgreSQL; adapters override what differs.
Every identifier is validated before wrapping and every value becomes a
? placeholder, so the only way to put text into a statement verbatim
is through RawSql.
- Implementers
Constructors
- Grammar()
-
const
Properties
Methods
-
compileDelete(
QueryBuilder< Object?> q) → Compiled -
compileExists(
QueryBuilder< Object?> q) → Compiled -
compileInsert(
String table, List< Map< rows) → CompiledString, Object?> > -
compileInsertGetId(
String table, Map< String, Object?> row, String primaryKey) → Compiled - Insert with the generated key returned. Both SQLite (3.35+) and PostgreSQL understand RETURNING.
-
compileSelect(
QueryBuilder< Object?> q) → Compiled -
compileTruncate(
String table) → String -
compileUpdate(
QueryBuilder< Object?> q, Map<String, Object?> values) → Compiled -
compileWheres(
List< WhereClause> wheres, List<Object?> bindings) → String -
encode(
Object? value) → Object? - How a Dart value travels to the driver. Overridden per dialect (SQLite has no bool or DateTime type).
-
encodeAll(
Iterable< Object?> values) → List<Object?> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
wrap(
Object identifier) → String -
Wraps
table.column,table.*,column as alias, or passes RawSql through. -
wrapTable(
String table) → String -
wrapValue(
String value) → String
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited