SqlQueries class final

Dialect-explicit compiler for typed SQL operations.

This object stores no database or request state. Every terminal operation receives its SqlExecutor explicitly.

Constructors

SqlQueries(SqlDialect dialect)
Creates a compiler for dialect.
const

Properties

dialect → SqlDialect
Database dialect used for identifier quoting and capability checks.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

countRows(SqlTable<Object?> from, {List<SqlJoin> joins = const <SqlJoin>[], SqlPredicate? where}) → SqlRead<int>
Counts rows produced by from, optional relational joins, and where.
deleteAll(SqlTable<Object?> table, {required SqlAllRows confirm}) → SqlWrite
Creates an intentional full-table DELETE.
deleteWhere(SqlTable<Object?> table, {required SqlPredicate where}) → SqlWrite
Creates a DELETE constrained by where.
insert(SqlTable<Object?> table, Iterable<SqlAssignment> values) → SqlWrite
Creates a single-row INSERT.
insertMany(SqlTable<Object?> table, Iterable<Iterable<SqlAssignment>> rows) → SqlWrite
Creates one INSERT containing multiple rows.
insertOnConflictDoNothing(SqlTable<Object?> table, Iterable<SqlAssignment> values, {required Iterable<SqlTableColumn<Object?>> target}) → SqlWrite
Creates a single-row INSERT that does nothing on a matching conflict.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
select<R>({required SqlTable<Object?> from, required SqlProjection<R> projection, List<SqlJoin> joins = const <SqlJoin>[], SqlPredicate? where, List<SqlOrder> orderBy = const <SqlOrder>[], int? limit, int? offset}) → SqlRead<R>
Selects a custom projection from from and optional relational joins.
selectTable<R>(SqlTable<R> table, {List<SqlJoin> joins = const <SqlJoin>[], SqlPredicate? where, List<SqlOrder> orderBy = const <SqlOrder>[], int? limit, int? offset}) → SqlRead<R>
Selects the default SqlTable.projection from table.
toString() → String
A string representation of this object.
inherited
updateAll(SqlTable<Object?> table, Iterable<SqlUpdateAssignment> values, {required SqlAllRows confirm}) → SqlWrite
Creates an intentional full-table UPDATE.
updateWhere(SqlTable<Object?> table, Iterable<SqlUpdateAssignment> values, {required SqlPredicate where}) → SqlWrite
Creates an UPDATE constrained by where.

Operators

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