PlexQuery<T extends PlexEntity> class
Fluent query builder for PlexQueryable (e.g. PlexEntityCollection).
Example:
final orders = await db.getEntityCollection<Order>('orders', ...)
.query()
.where('status').equals('pending')
.where('total').greaterThan(100)
.orderBy('createdAt', descending: true)
.limit(20)
.get();
Constructors
-
PlexQuery(PlexQueryable<
T> _source)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
count(
) → Future< int> - Count matching records.
-
deleteAll(
) → Future< void> - Delete all matching records.
-
filter(
Filter f) → PlexQuery< T> -
Add a raw
Filter(for advanced use). -
first(
) → Future< T?> - Return first matching entity or null.
-
get(
) → Future< List< T> > - Execute query and return all matching entities.
-
limit(
int n) → PlexQuery< T> - Limit number of results.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
offset(
int n) → PlexQuery< T> -
Skip
nresults. -
orderBy(
String field, {bool descending = false}) → PlexQuery< T> - Add sort order.
-
toString(
) → String -
A string representation of this object.
inherited
-
watch(
) → Stream< List< T> > - Stream of matching entities; emits whenever data changes.
-
where(
String field) → PlexQueryField< T> -
Start a filter on
field.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited