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.

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
Stream items by sending pointers from native code. Interestingly this is slower even though it transfers only pointers... Probably because of the slowness of asTypedList(), see native_pointers.dart benchmark For internal testing purposes.
describeParameters() String
For internal testing purposes.
find() List<T>
Finds Objects matching the query.
findFirst() → T?
Finds Objects matching the query and returns the first result or null if there are no results. Note: offset and limit are respected, if set.
findIds() List<int>
Finds Objects matching the query and returns their IDs.
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
Returns the number of removed Objects.
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