Query<T, Where extends QueryWhere> class

A SQL SELECT query builder.

Inheritance

Constructors

Query()

Properties

casts Map<String, String>
Casts to perform when querying the database.
read-only, inherited
fields List<String>
The list of fields returned by this query. [...]
read-only, inherited
fieldSet String
A String of all fields, joined by a comma (,).
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
substitutionValues Map<String, dynamic>
Values to insert into a prepared statement.
final, inherited
tableName String
The table against which to execute this query.
read-only, inherited
values QueryValues
A set of values, for an insertion or update. [...]
read-only
where → Where
A reference to an abstract query builder. [...]
read-only

Methods

adornWithTableName(String s) String
Preprends the tableName to the String, s.
andWhere(void f(Where)) → void
Shorthand for calling where.or with a Where clause.
canCompile(Set<String> trampoline) bool
Determines whether this query can be compiled. [...]
compile(Set<String> trampoline, {bool includeTableName = false, String preamble, bool withFields = true, String fromQuery}) String
override
crossJoin(String tableName) → void
Execute a CROSS JOIN (Cartesian product) against another table.
delete(QueryExecutor executor) Future<List<T>>
deleteOne(QueryExecutor executor) Future<T>
deserialize(List row) → T
inherited
fullOuterJoin(dynamic tableName, String localKey, String foreignKey, {String op = '=', List<String> additionalFields = const [], Set<String> trampoline}) → void
Execute a FULL OUTER JOIN against another table.
get(QueryExecutor executor) Future<List<T>>
inherited
getOne(QueryExecutor executor) Future<T>
override
groupBy(String key) → void
Groups the results by a given key.
insert(QueryExecutor executor) Future<T>
join(dynamic tableName, String localKey, String foreignKey, {String op = '=', List<String> additionalFields = const [], Set<String> trampoline}) → void
Execute an INNER JOIN against another table.
leftJoin(dynamic tableName, String localKey, String foreignKey, {String op = '=', List<String> additionalFields = const [], Set<String> trampoline}) → void
Execute a LEFT JOIN against another table.
limit(int n) → void
Limit the number of rows to return.
newWhereClause() → Where
Makes a Where clause.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
notWhere(void f(Where)) → void
Shorthand for calling where.or with a Where clause.
offset(int n) → void
Skip a number of rows in the query.
orderBy(String key, {bool descending = false}) → void
Sorts the results by a key.
orWhere(void f(Where)) → void
Shorthand for calling where.or with a Where clause.
reserveName(String name) String
Returns a unique version of name, which will not produce a collision within the context of this query.
rightJoin(dynamic tableName, String localKey, String foreignKey, {String op = '=', List<String> additionalFields = const [], Set<String> trampoline}) → void
Execute a RIGHT JOIN against another table.
selfJoin(dynamic tableName, String localKey, String foreignKey, {String op = '=', List<String> additionalFields = const [], Set<String> trampoline}) → void
Execute a SELF JOIN.
toString() String
A string representation of this object. [...]
inherited
union(QueryBase<T> other) Union<T>
inherited
unionAll(QueryBase<T> other) Union<T>
inherited
update(QueryExecutor executor) Future<List<T>>
updateOne(QueryExecutor executor) Future<T>

Operators

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