Query class abstract
A Query filters the data at a Firebase location so only a subset of the child data is visible to you. This can be used for example to restrict a large list of items down to a number suitable for synchronizing to the client.
Queries are created by chaining together one or two of the following filter functions: startAt(), endAt() and limit().
Once a Query is constructed, you can receive data for it using on(). You will only receive events and DataSnapshots for the subset of the data that matches your query.
- Implementers
Constructors
- Query()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onChildAdded
→ Stream<
Event> -
Streams for 'child_added' events.
no setter
-
onChildChanged
→ Stream<
Event> -
Streams for 'child_changed' events.
no setter
-
onChildMoved
→ Stream<
Event> -
Streams for 'child_moved' events.
no setter
-
onChildRemoved
→ Stream<
Event> -
Streams for 'child_removed' events.
no setter
-
onValue
→ Stream<
Event> -
Streams for 'value' events.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
endAt(
dynamic value, {String? key}) → Query - Creates a Query with the specified ending point. The generated Query includes children which match the specified ending point. If no arguments are provided, the ending point will be the end of the data.
-
equalTo(
dynamic value, {String? key}) → Query - Creates a Query which includes children which match the specified value.
-
get(
) → Future - Convenient method to get the value for this query.
-
keepSynced(
bool value) → Future< void> - By calling keepSynced(true) on a location, the data for that location will automatically be downloaded and kept in sync, even when no listeners are attached for that location.
-
limitToFirst(
int limit) → Query - Generates a new Query object limited to the first certain number of children.
-
limitToLast(
int limit) → Query - Generates a new Query object limited to the last certain number of children.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
on(
String eventType) → Stream< Event> -
Gets a stream for events of type
eventType
-
once(
) → Future< DataSnapshot> - Listens for a single value event and then stops listening.
-
orderByChild(
String child) → Query - Generates a new Query object ordered by the specified child key.
-
orderByKey(
) → Query - Generates a new Query object ordered by key.
-
orderByPriority(
) → Query - Generates a new Query object ordered by priority.
-
orderByValue(
) → Query - Generates a new Query object ordered by child values.
-
reference(
) → DatabaseReference - Queries are attached to a location in your Firebase. This method will return a Firebase reference to that location.
-
startAt(
dynamic value, {String? key}) → Query - Creates a Query with the specified starting point. The generated Query includes children which match the specified starting point. If no arguments are provided, the starting point will be the beginning of the data.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited