DatabaseUniverseQuery<T> class
abstract
Querying is how you find records that match certain conditions.
It is important to call close()
when you are done with a query, otherwise
you will leak resources.
- Available extensions
Constructors
Properties
- databaseUniverse → DatabaseUniverse
-
The corresponding DatabaseUniverse instance.
no setter
- 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(
) → double -
Available on DatabaseUniverseQuery<
Calculates the average of all values. This only works for numeric values.T?> , provided by the QueryNumAggregation extension -
averageAsync(
) → Future< double> -
Available on DatabaseUniverseQuery<
Calculates the average of all values. This only works for numeric values.T?> , provided by the QueryNumAggregation extension -
close(
) → void - Release all resources associated with this query.
-
count(
) → int - Finds the smallest value matching the query. Null values are considered smaller than all other values.
-
countAsync(
) → Future< int> -
Available on DatabaseUniverseQuery<
Count how many objects match the query.T> , provided by the QueryAsync extension -
deleteAll(
{int? offset, int? limit}) → int - Delete all objects that match this query. Returns the number of deleted objects.
-
deleteFirst(
{int? offset}) → bool - Delete the first object that matches this query. Returns whether an object has been deleted.
-
exportJson(
{int? offset, int? limit}) → List< Map< String, dynamic> > - Export the results of this query as json.
-
findAll(
{int? offset, int? limit}) → List< T> - Find all objects that match this query.
-
findAllAsync(
{int? offset, int? limit}) → Future< List< T> > -
Available on DatabaseUniverseQuery<
Find all objects that match this query.T> , provided by the QueryAsync extension -
findFirst(
{int? offset}) → T? -
Find the first object that matches this query or
null
if no object matches. -
findFirstAsync(
{int? offset}) → Future< T?> -
Available on DatabaseUniverseQuery<
Find the first object that matches this query orT> , provided by the QueryAsync extensionnull
if no object matches. -
isEmpty(
) → bool -
Yields
true
if there are no objects that match the query. -
isEmptyAsync(
) → Future< bool> -
Available on DatabaseUniverseQuery<
YieldsT> , provided by the QueryAsync extensiontrue
if there are no objects that match the query. -
max(
) → DateTime? -
Available on DatabaseUniverseQuery<
Finds the largest value matching the query.T> , provided by the QueryDateAggregation extension -
max(
) → T? -
Available on DatabaseUniverseQuery<
Finds the largest value matching the query.T?> , provided by the QueryNumAggregation extension -
max(
) → T? -
Available on DatabaseUniverseQuery<
Finds the largest value matching the query.T?> , provided by the QueryStringAggregation extension -
maxAsync(
) → Future< DateTime?> -
Available on DatabaseUniverseQuery<
Finds the largest value matching the query.T> , provided by the QueryDateAggregation extension -
maxAsync(
) → Future< T?> -
Available on DatabaseUniverseQuery<
Finds the largest value matching the query.T?> , provided by the QueryNumAggregation extension -
maxAsync(
) → Future< T?> -
Available on DatabaseUniverseQuery<
Finds the largest value matching the query.T?> , provided by the QueryStringAggregation extension -
min(
) → DateTime? -
Available on DatabaseUniverseQuery<
Finds the smallest value matching the query. Null values are considered smaller than all other values.T> , provided by the QueryDateAggregation extension -
min(
) → T? -
Available on DatabaseUniverseQuery<
Finds the smallest value matching the query. Null values are considered smaller than all other values.T?> , provided by the QueryNumAggregation extension -
min(
) → T? -
Available on DatabaseUniverseQuery<
Finds the smallest value matching the query. Null values are considered smaller than all other values.T?> , provided by the QueryStringAggregation extension -
minAsync(
) → Future< DateTime?> -
Available on DatabaseUniverseQuery<
Finds the smallest value matching the query. Null values are considered smaller than all other values.T> , provided by the QueryDateAggregation extension -
minAsync(
) → Future< T?> -
Available on DatabaseUniverseQuery<
Finds the smallest value matching the query. Null values are considered smaller than all other values.T?> , provided by the QueryNumAggregation extension -
minAsync(
) → Future< T?> -
Available on DatabaseUniverseQuery<
Finds the smallest value matching the query. Null values are considered smaller than all other values.T?> , provided by the QueryStringAggregation extension -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sum(
) → T -
Available on DatabaseUniverseQuery<
Calculates the sum of all values. This only works for numeric values.T?> , provided by the QueryNumAggregation extension -
sumAsync(
) → Future< T> -
Available on DatabaseUniverseQuery<
Calculates the sum of all values. This only works for numeric values.T?> , provided by the QueryNumAggregation extension -
toString(
) → String -
A string representation of this object.
inherited
-
updateProperties(
Map< int, dynamic> changes, {int? offset, int? limit}) → int - This is a low level method to update objects.
-
watch(
{bool fireImmediately = false, int? offset, int? limit}) → Stream< List< T> > - Create a watcher that yields the results of this query whenever its results have (potentially) changed.
-
watchLazy(
{bool fireImmediately = false}) → Stream< void> -
Watch the query for changes. If
fireImmediately
istrue
, an event will be fired immediately.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited