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
Configure a limit for this query.
no getter
offset int
Configure an offset for this query.
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 the query. Returns null if there are no results. Note: offset and limit are respected, if set.
findFirstAsync() Future<T?>
Like findFirst, but runs the query operation asynchronously in a worker isolate.
findIds() List<int>
Finds Objects matching the query and returns their IDs.
findIdsAsync() Future<List<int>>
Like findIds, but runs the query operation asynchronously in a worker isolate.
findUnique() → T?
Finds the only object matching the query. Returns null if there are no results or throws NonUniqueResultException if there are multiple objects matching.
findUniqueAsync() Future<T?>
Like findUnique, 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