Query<T> class abstract

Querying is how you find records that match certain conditions.

Available extensions

Constructors

Query()

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

average() Future<double>

Available on Query<T?>, provided by the QueryAggregation extension

Returns the average value of this query.
averageSync() double

Available on Query<T?>, provided by the QueryAggregation extension

Returns the average value of this query.
count() Future<int>
Count how many objects match this query.
countSync() int
Count how many objects match this query.
deleteAll() Future<int>
Delete all objects that match this query. Returns the number of deleted objects.
deleteAllSync() int
Delete all objects that match this query. Returns the number of deleted objects.
deleteFirst() Future<bool>
Delete the first object that matches this query. Returns whether a object has been deleted.
deleteFirstSync() bool
Delete the first object that matches this query. Returns whether a object has been deleted.
exportJson() Future<List<Map<String, dynamic>>>
Export the results of this query as json.
exportJsonKt() Future<KtList<KtMap<String, dynamic>>>

Available on Query<T>, provided by the KtQuery extension

Export the results of this query as json.
exportJsonKtSync() → KtList<KtMap<String, dynamic>>

Available on Query<T>, provided by the KtQuery extension

Export the results of this query as json.
exportJsonRaw<R>(R callback(Uint8List)) Future<R>
Export the results of this query as json bytes.
exportJsonRawSync<R>(R callback(Uint8List)) → R
Export the results of this query as json bytes.
exportJsonSync() List<Map<String, dynamic>>
Export the results of this query as json.
findAll() Future<List<T>>
Find all objects that match this query.
findAllKt() Future<KtList<T>>

Available on Query<T>, provided by the KtQuery extension

Find all objects that match this query.
findAllKtSync() → KtList<T>

Available on Query<T>, provided by the KtQuery extension

Find all objects that match this query.
findAllSync() List<T>
Find all objects that match this query.
findFirst() Future<T?>
Find the first object that matches this query or null if no object matches.
findFirstSync() → T?
Find the first object that matches this query or null if no object matches.
max() Future<T?>

Available on Query<T?>, provided by the QueryAggregation extension

Returns the maximum value of this query.
max() Future<DateTime?>

Available on Query<T>, provided by the QueryDateAggregation extension

Returns the maximum value of this query.
maxSync() DateTime?

Available on Query<T>, provided by the QueryDateAggregation extension

Returns the maximum value of this query.
maxSync() → T?

Available on Query<T?>, provided by the QueryAggregation extension

Returns the maximum value of this query.
min() Future<DateTime?>

Available on Query<T>, provided by the QueryDateAggregation extension

Returns the minimum value of this query.
min() Future<T?>

Available on Query<T?>, provided by the QueryAggregation extension

Returns the minimum value of this query.
minSync() DateTime?

Available on Query<T>, provided by the QueryDateAggregation extension

Returns the minimum value of this query.
minSync() → T?

Available on Query<T?>, provided by the QueryAggregation extension

Returns the minimum value of this query.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sum() Future<T>

Available on Query<T?>, provided by the QueryAggregation extension

Returns the sum of all values of this query.
sumSync() → T

Available on Query<T?>, provided by the QueryAggregation extension

Returns the sum of all values of this query.
toString() String
A string representation of this object.
inherited
watch({bool initialReturn = false}) Stream<List<T>>
Create a watcher that yiels the results of this query whenever its results have (potentially) changed.
watchKt({bool initialReturn = false}) Stream<KtList<T>>

Available on Query<T>, provided by the KtQuery extension

Create a watcher that yiels the results of this query whenever its results have (potentially) changed.
watchLazy() Stream<void>
Watch the query for changes.

Operators

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