ComputedField class
A computed field definition for correlated subqueries.
Generates SQL like:
(SELECT MIN("price") FROM "Plan" WHERE "consultantId" = t0.id) AS "minPrice"
Constructors
-
ComputedField.avg(String field, {required String from, Map<
String, dynamic> ? where}) -
Create an AVG aggregate computed field.
factory
-
ComputedField.count({String field = '*', required String from, Map<
String, dynamic> ? where}) -
Create a COUNT aggregate computed field.
factory
-
ComputedField.first(String field, {required String from, Map<
String, dynamic> ? where, Map<String, String> ? orderBy}) -
Create a FIRST (single value) computed field.
factory
-
ComputedField.max(String field, {required String from, Map<
String, dynamic> ? where}) -
Create a MAX aggregate computed field.
factory
-
ComputedField.min(String field, {required String from, Map<
String, dynamic> ? where}) -
Create a MIN aggregate computed field.
factory
-
ComputedField.sum(String field, {required String from, Map<
String, dynamic> ? where}) -
Create a SUM aggregate computed field.
factory
Properties
- field → String
-
The field to aggregate or select.
final
- from → String
-
The model/table to query from.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- operation → AggregateOp
-
The aggregate operation (MIN, MAX, AVG, SUM, COUNT, or FIRST for single value).
final
-
orderBy
→ Map<
String, String> ? -
ORDER BY for FIRST operation.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
where
→ Map<
String, dynamic> ? -
WHERE conditions for the subquery.
Can contain FieldRef for correlated references.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert to JSON for query builder.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited