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
-
- Object
- SqlStatement
- BaseSelectStatement<
SingleTableSelectStatement< Row, RS> , Row> - SingleTableSelectStatement
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
DISTINCTclause 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 BYclause for this select statement.getter/setter pairinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- limitClause ↔ Limit?
-
The optional
LIMITclause restricting the amount of rows returned by this statement.getter/setter pairinherited - orderByClause ↔ OrderBy?
-
The optional
ORDER BYclause 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< expressions) → SelectStatementObject> > -
Adds multiple columns to this query.
inherited
-
asSelf(
) → SingleTableSelectStatement< Row, RS> -
Returns
thisasSelf. -
asyncMap<
N> (FutureOr< N> mapper(Row)) → Selectable<N> -
Maps this selectable by the
mapperfunction.inherited -
compileWith(
StatementCompiler compiler) → void -
Compiles this component with the given StatementCompiler by invoking the
relevant
addmethod 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
tableto this query using aCROSS JOINoperator.inherited -
except(
BaseSelectStatement< BaseSelectStatement, dynamic> other) → SelectStatement -
Appends the
otherstatement as aEXCEPTclause after this query.inherited -
fullOuterJoin(
ResultSetDsl table, {Expression< bool> ? on, bool? includeInResult}) → SelectStatement -
Adds
tableto this query using aFULL OUTER JOINoperator.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,
nullwill be returned instead.inherited -
groupBy(
Iterable< Expression< expressions, {Expression<Object> >bool> ? having}) → SingleTableSelectStatement<Row, RS> -
Groups the result by values in
expressions.inherited -
innerJoin(
ResultSetDsl table, {Expression< bool> ? on, bool? includeInResult}) → SelectStatement -
Adds
tableto this query using anINNER JOINoperator.inherited -
intersect(
BaseSelectStatement< BaseSelectStatement, dynamic> other) → SelectStatement -
Appends the
otherstatement as aINTERSECTclause after this query.inherited -
join(
Iterable< Join> joins) → SelectStatement -
Adds all
joinsto this select statement.inherited -
leftOuterJoin(
ResultSetDsl table, {Expression< bool> ? on, bool? includeInResult}) → SelectStatement -
Adds
tableto this query using aLEFT OUTER JOINoperator.inherited -
limit(
int limit, {int? offset}) → SingleTableSelectStatement< Row, RS> -
Limits the amount of rows returned by capping them at
limit. Ifoffsetis provided as well, the firstoffsetrows will be skipped and not included in the result.inherited -
map<
N> (N mapper(Row)) → Selectable< N> -
Maps this selectable by the
mapperfunction.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
orderBy(
List< OrderClauseGenerator< clauses) → SingleTableSelectStatement<RS> >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
tableto this query using aRIGHT OUTER JOINoperator.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
union(
BaseSelectStatement< BaseSelectStatement, dynamic> other) → SelectStatement -
Appends the
otherstatement as aUNIONclause after this query.inherited -
unionAll(
BaseSelectStatement< BaseSelectStatement, dynamic> other) → SelectStatement -
Appends the
otherstatement as aUNION ALLclause 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 aStream<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 aStream<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,nullwill 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