BaseSelectStatement<Self extends BaseSelectStatement<Self, Row>, Row> class sealed

Common class for generated SELECT statements on databases.

Inheritance
Mixed-in types
Annotations
  • @optionalTypeArgs

Properties

compounds → List<CompoundSelect>
All CompoundSelect statements that have been added to this select statement using union, unionAll, except and intersect.
final
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.
final
fromClause → FromClause
The from clause of select statement.
final
groupByClause ↔ GroupBy?
The optional GROUP BY clause for this select statement.
getter/setter pair
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 pair
orderByClause ↔ OrderBy?
The optional ORDER BY clause for this select statement.
getter/setter pair
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.
final
whereClause ↔ WhereClause?
The filtering WHERE clause of this select statement.
getter/setter pair

Methods

addColumn(Expression<Object> expression) → SelectStatement
Adds a column to this query.
addColumns(Iterable<Expression<Object>> expressions) → SelectStatement
Adds multiple columns to this query.
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.
override
crossJoin(ResultSetDsl table, {bool? includeInResult}) → SelectStatement
Adds table to this query using a CROSS JOIN operator.
except(BaseSelectStatement<BaseSelectStatement, dynamic> other) → SelectStatement
Appends the other statement as a EXCEPT clause after this query.
fullOuterJoin(ResultSetDsl table, {Expression<bool>? on, bool? includeInResult}) → SelectStatement
Adds table to this query using a FULL OUTER JOIN operator.
get() → Future<List<Row>>
Executes this statement and returns the result.
override
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}) → Self
Groups the result by values in expressions.
innerJoin(ResultSetDsl table, {Expression<bool>? on, bool? includeInResult}) → SelectStatement
Adds table to this query using an INNER JOIN operator.
intersect(BaseSelectStatement<BaseSelectStatement, dynamic> other) → SelectStatement
Appends the other statement as a INTERSECT clause after this query.
join(Iterable<Join> joins) → SelectStatement
Adds all joins to this select statement.
leftOuterJoin(ResultSetDsl table, {Expression<bool>? on, bool? includeInResult}) → SelectStatement
Adds table to this query using a LEFT OUTER JOIN operator.
limit(int limit, {int? offset}) → Self
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.
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
rightOuterJoin(ResultSetDsl table, {Expression<bool>? on, bool? includeInResult}) → SelectStatement
Adds table to this query using a RIGHT OUTER JOIN operator.
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.
unionAll(BaseSelectStatement<BaseSelectStatement, dynamic> other) → SelectStatement
Appends the other statement as a UNION ALL clause after this query.
watch() → QueryStream<List<Row>>
Creates an auto-updating stream of the result that emits new items whenever any table used in this statement changes.
override
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

Operators

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