DatumCustomFieldQuery<T> class
abstract
Helper class for building complex queries with custom field definitions.
Example:
class TaskQuery extends DatumCustomFieldQuery<Task> {
static const title = 'title';
static const completed = 'completed';
static const tags = 'tags';
TaskQuery whereCompleted(bool value) {
return this..where(completed, isEqualTo: value);
}
TaskQuery whereHasTag(String tag) {
return this..where(tags, arrayContains: tag);
}
}
- Inheritance
-
- Object
- DatumQueryBuilder<
T> - DatumCustomFieldQuery
Constructors
- DatumCustomFieldQuery()
- Creates a new instance of DatumCustomFieldQuery.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- logicalOperator ↔ LogicalOperator
-
The logical operator for combining filters at the root level.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
and(
List< FilterCondition> conditions) → DatumQueryBuilder<T> -
Adds a composite AND filter (explicit grouping).
inherited
-
build(
) → DatumQuery -
Builds and returns the final DatumQuery object.
inherited
-
clearFilters(
) → void -
Clears all filters.
inherited
-
clearSorting(
) → void -
Clears all sorting.
inherited
-
limit(
int count) → DatumQueryBuilder< T> -
Sets the maximum number of items to return.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
offset(
int count) → DatumQueryBuilder< T> -
Sets the number of items to skip.
inherited
-
or(
List< FilterCondition> conditions) → DatumQueryBuilder<T> -
Adds a composite OR filter.
inherited
-
orderBy(
String field, {bool descending = false, NullSortOrder nullSortOrder = NullSortOrder.last}) → DatumQueryBuilder< T> -
Adds a sorting condition to the query.
inherited
-
reset(
) → void -
Resets the entire query.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
where(
String field, {dynamic isEqualTo, dynamic isNotEqualTo, dynamic isGreaterThan, dynamic isGreaterThanOrEqualTo, dynamic isLessThan, dynamic isLessThanOrEqualTo, String? contains, String? containsIgnoreCase, String? startsWith, String? endsWith, List? isIn, List? isNotIn, dynamic arrayContains, List? arrayContainsAny, String? matches, List? between}) → DatumQueryBuilder< T> -
Adds a filter condition to the query.
inherited
-
whereNotNull(
String field) → DatumQueryBuilder< T> -
Adds a not-null check filter.
inherited
-
whereNull(
String field) → DatumQueryBuilder< T> -
Adds a null check filter.
inherited
-
whereRaw(
FilterCondition condition) → DatumQueryBuilder< T> -
Adds a raw filter condition.
inherited
-
whereWithinDistance(
String field, Map< String, double> center, double radiusInMeters) → DatumQueryBuilder<T> -
Adds a geographical distance filter.
inherited
-
withRelated(
List< String> relations) → DatumQueryBuilder<T> -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited