AnalyticClause class
The AnalyticClause is used for window / analytic functions (row_number, rank, dense_rank) when a callback is passed.
In JavaScript libraries the callback is often this-bound to an
analytic builder.
In Dart (no this-binding) we expose the same API on a builder object
that is passed to the callback.
Example:
db.queryBuilder()
.table('employees')
.rowNumber('rn', (a) => a.partitionBy('team').orderBy('salary', 'desc'));
Constructors
- AnalyticClause({required String method, required String? alias, List? order, List? partitions})
Properties
- alias → String?
-
Optional alias used in SQL output:
row_number() over (...) as alias.final - grouping → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- method → String
-
The SQL function name: 'row_number', 'rank', 'dense_rank'
final
- order → List
-
ORDER BY entries — each item is either a String column name or a
Map
{'column': String, 'order': String?}.final - partitions → List
-
PARTITION BY entries — each item is either a String column name or a
Map
{'column': String, 'order': String?}.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
orderBy(
dynamic column, [String? direction]) → AnalyticClause - Add ORDER BY column(s).
-
partitionBy(
dynamic column, [String? direction]) → AnalyticClause - Add PARTITION BY column(s).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited