Query<T> class

A repeatable Query returning the latest matching Objects.

Use find or related methods to fetch the latest results from the Box.

Use property to only return values or an aggregate of a single Property.

Implemented types
Available extensions

Properties

entityId int
no setter
hashCode int
The hash code for this object.
no setterinherited
limit int
If greater than 0, Query methods will return at most limit many results.
no getter
offset int
If greater than 0, Query methods will skip offset number of results.
no getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Close the query and free resources.
count() int
Returns the number of matching Objects.
describe() String
For internal testing purposes.
describeParameters() String
For internal testing purposes.
find() List<T>
Finds objects matching the query.
findAsync() Future<List<T>>
Like find, but runs the query operation asynchronously in a worker isolate.
findFirst() → T?
Finds the first object matching this query.
findFirstAsync() Future<T?>
Like findFirst, but runs the query operation asynchronously in a worker isolate.
findIds() List<int>
Like find, but returns just the IDs of the objects.
findIdsAsync() Future<List<int>>
Like findIds, but runs the query operation asynchronously in a worker isolate.
findIdsWithScores() List<IdWithScore>
Finds IDs of objects matching the query associated to their query score (e. g. distance in NN search).
findIdsWithScoresAsync() Future<List<IdWithScore>>
Like findIdsWithScores, but runs the query operation asynchronously in a worker isolate.
findUnique() → T?
Finds the only object matching this query.
findUniqueAsync() Future<T?>
Like findUnique, but runs the query operation asynchronously in a worker isolate.
findWithScores() List<ObjectWithScore<T>>
Finds objects matching the query associated to their query score (e. g. distance in NN search). The resulting list is sorted by score in ascending order.
findWithScoresAsync() Future<List<ObjectWithScore<T>>>
Like findWithScores, but runs the query operation asynchronously in a worker isolate.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
property<DartType>(QueryProperty<T, DartType> prop) PropertyQuery<DartType>
Use the same query conditions but only return a single property (field).
remove() int
Removes all matching objects. Returns the number of removed objects.
removeAsync() Future<int>
Like remove, but runs in a worker isolate.
stream() Stream<T>
Finds Objects matching the query, streaming them while the query executes.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited