DatumQuery class
Defines a query for filtering and sorting items from a data source.
This is used with watchQuery and other query methods to retrieve a subset
of data. It's recommended to build queries using the DatumQueryBuilder for
a more expressive and type-safe API.
- Available extensions
Constructors
-
DatumQuery({List<
FilterCondition> filters = const [], List<SortDescriptor> sorting = const [], int? limit, int? offset, LogicalOperator logicalOperator = LogicalOperator.and, List<String> withRelated = const []}) -
Creates a query with a list of filters and sorting criteria.
const
Properties
-
filters
→ List<
FilterCondition> -
A list of filter conditions to apply.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- limit → int?
-
The maximum number of items to return.
final
- logicalOperator → LogicalOperator
-
The logical operator to combine filters (AND/OR).
final
- offset → int?
-
The number of items to skip from the beginning of the result set.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sorting
→ List<
SortDescriptor> -
A list of sorting descriptors to apply.
final
-
withRelated
→ List<
String> -
A list of relationship names to eager-load.
final
Methods
-
copyWith(
{List< FilterCondition> ? filters, List<SortDescriptor> ? sorting, int? limit, int? offset, LogicalOperator? logicalOperator, List<String> ? withRelated}) → DatumQuery - Creates a copy of this query with updated fields.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toSql(
String tableName, {SqlDialect dialect = SqlDialect.sqlite, DatumCustomSqlBuilder? customBuilder, DatumPlaceholderBuilder? placeholderBuilder}) → DatumSqlQueryResult -
Available on DatumQuery, provided by the DatumQuerySqlConverter extension
Converts this DatumQuery into a parameterized SQL query string. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited