InMemoryQueryBuilder<T> class
final
A QueryBuilder that loads every object and filters, sorts and pages them in memory.
For engines without a query language of their own. deleteAll isn't supported and throws an UnsupportedError.
- Implemented types
-
- QueryBuilder<
T>
- QueryBuilder<
Constructors
-
InMemoryQueryBuilder({required Future<
List< fetcher(), required Stream<T> >List< watcher()})T> > -
Creates a builder that loads the objects with
fetcherand watches them withwatcher.
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> -
Runs the query and returns the number of results.
override
-
deleteAll(
) → Future< bool> -
Deletes the results, where the engine supports it.
override
-
findAll(
) → Future< List< T> > -
Runs the query and returns every result.
override
-
findFirst(
) → Future< T?> -
Runs the query and returns the first result, or null if there is none.
override
-
limit(
int count) → QueryBuilder< T> -
Returns at most
countresults.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
offset(
int start) → QueryBuilder< T> -
Skips the first
startresults.override -
sortBy(
SortComparator< T> comparator) → QueryBuilder<T> -
Orders the results with
comparator, replacing any earlier order.override -
toString(
) → String -
A string representation of this object.
inherited
-
watch(
) → Stream< List< T> > -
Emits the results now, and again whenever the collection changes.
override
-
where(
WhereClause< T> clause) → QueryBuilder<T> -
Keeps only the objects for which
clausereturns true. Several calls combine with AND.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited