SingleTableSelectStatement<Row extends Object, RS extends ResultSet<Row, RS>> class final

A select statement selecting from a single table.

Because only a single table is in scope, some helper methods are available through SingleTableStatementMixin.

Inheritance

Properties

compounds → List<CompoundSelect>
All CompoundSelect statements that have been added to this select statement using union, unionAll, except and intersect.
finalinherited
dialectSpecificOptions → Map<Symbol, Object?>
A map of dialect-specific options.
finalinherited
distinct → bool
Whether to add a DISTINCT clause to this select, meaning that duplicate rows would be removed.
finalinherited
fromClause → FromClause
The from clause of select statement.
finalinherited
groupByClause ↔ GroupBy?
The optional GROUP BY clause for this select statement.
getter/setter pairinherited
hashCode → int
The hash code for this object.
no setterinherited
limitClause ↔ Limit?
The optional LIMIT clause restricting the amount of rows returned by this statement.
getter/setter pairinherited
orderByClause ↔ OrderBy?
The optional ORDER BY clause for this select statement.
getter/setter pairinherited
resultSet → ResultSet<Row, RS>
The ResultSet that this statement is primarily operating on.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
structure → ResultSetStructure
The ResultSetStructure for this statement, describing columns we expect it to return.
finalinherited
whereClause ↔ WhereClause?
The WhereClause filtering rows for this statement.
getter/setter pairinherited

Methods

addColumn(Expression<Object> expression) → SelectStatement
Adds a column to this query.
inherited
addColumns(Iterable<Expression<Object>> expressions) → SelectStatement
Adds multiple columns to this query.
inherited
asSelf() → SingleTableSelectStatement<Row, RS>
Returns this as Self.
asyncMap<N>(FutureOr<N> mapper(Row)) → Selectable<N>
Maps this selectable by the mapper function.
inherited
compileWith(StatementCompiler compiler) → void
Compiles this component with the given StatementCompiler by invoking the relevant add method on it.
inherited
createMapper(DriftDialect dialect, ResultSetStructure resultSet) → Row Function(RawRow p1)
Creates a function that, given a DriftRow, extracts the result set for this BaseSelectStatement.
crossJoin(ResultSetDsl table, {bool? includeInResult}) → SelectStatement
Adds table to this query using a CROSS JOIN operator.
inherited
except(BaseSelectStatement<BaseSelectStatement, dynamic> other) → SelectStatement
Appends the other statement as a EXCEPT clause after this query.
inherited
fullOuterJoin(ResultSetDsl table, {Expression<bool>? on, bool? includeInResult}) → SelectStatement
Adds table to this query using a FULL OUTER JOIN operator.
inherited
get() → Future<List<Row>>
Executes this statement and returns the result.
inherited
getSingle() → Future<Row>
Executes this statement, like Selectable.get, but only returns one value. the query returns no or too many rows, the returned future will complete with an error.
inherited
getSingleOrNull() → Future<Row?>
Executes this statement, like Selectable.get, but only returns one value. If the result too many values, this method will throw. If no row is returned, null will be returned instead.
inherited
groupBy(Iterable<Expression<Object>> expressions, {Expression<bool>? having}) → SingleTableSelectStatement<Row, RS>
Groups the result by values in expressions.
inherited
innerJoin(ResultSetDsl table, {Expression<bool>? on, bool? includeInResult}) → SelectStatement
Adds table to this query using an INNER JOIN operator.
inherited
intersect(BaseSelectStatement<BaseSelectStatement, dynamic> other) → SelectStatement
Appends the other statement as a INTERSECT clause after this query.
inherited
join(Iterable<Join> joins) → SelectStatement
Adds all joins to this select statement.
inherited
leftOuterJoin(ResultSetDsl table, {Expression<bool>? on, bool? includeInResult}) → SelectStatement
Adds table to this query using a LEFT OUTER JOIN operator.
inherited
limit(int limit, {int? offset}) → SingleTableSelectStatement<Row, RS>
Limits the amount of rows returned by capping them at limit. If offset is provided as well, the first offset rows will be skipped and not included in the result.
inherited
map<N>(N mapper(Row)) → Selectable<N>
Maps this selectable by the mapper function.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orderBy(List<OrderClauseGenerator<RS>> clauses) → SingleTableSelectStatement<Row, RS>
Orders the result by the given clauses. The clauses coming first in the list have a higher priority, the later clauses are only considered if the first clause considers two rows to be equal.
rightOuterJoin(ResultSetDsl table, {Expression<bool>? on, bool? includeInResult}) → SelectStatement
Adds table to this query using a RIGHT OUTER JOIN operator.
inherited
toString() → String
A string representation of this object.
inherited
union(BaseSelectStatement<BaseSelectStatement, dynamic> other) → SelectStatement
Appends the other statement as a UNION clause after this query.
inherited
unionAll(BaseSelectStatement<BaseSelectStatement, dynamic> other) → SelectStatement
Appends the other statement as a UNION ALL clause after this query.
inherited
watch() → QueryStream<List<Row>>
Creates an auto-updating stream of the result that emits new items whenever any table used in this statement changes.
inherited
watchSingle() → Stream<Row>
Creates an auto-updating stream of this statement, similar to Selectable.watch. However, it is assumed that the query will only emit one result, so instead of returning a Stream<List<T>>, this returns a Stream<T>. If, at any point, the query emits no or more than one rows, an error will be added to the stream instead.
inherited
watchSingleOrNull() → Stream<Row?>
Creates an auto-updating stream of this statement, similar to Selectable.watch. However, it is assumed that the query will only emit one result, so instead of returning a Stream<List<T>>, this returns a Stream<T?>. If the query emits more than one row at some point, an error will be emitted to the stream instead. If the query emits zero rows at some point, null will be added to the stream instead.
inherited
where(Expression<bool> filter(RS tbl)) → SingleTableSelectStatement<Row, RS>
Makes this statement only include rows that match the filter.
inherited

Operators

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