| Known Direct Subclasses |
The Query class (and its subclass, DatabaseReference) are used for reading data.
Listeners are attached, and they will be triggered when the corresponding data changes.
Instances of Query are obtained by calling startAt(), endAt(), or limit() on a DatabaseReference.
| ChildEventListener |
addChildEventListener(ChildEventListener listener)
Add a listener for child events occurring at this location.
|
| void |
addListenerForSingleValueEvent(ValueEventListener listener)
Add a listener for a single change in the data at this location.
|
| ValueEventListener |
addValueEventListener(ValueEventListener listener)
Add a listener for changes in the data at this location.
|
| Query | |
| Query | |
| Query | |
| Query |
endAt(double value)
Creates a query constrained to only return child nodes with a value less than or equal to the
given value, using the given
orderBy directive or priority as default. |
| Query |
endAt(boolean value)
Creates a query constrained to only return child nodes with a value less than or equal to the
given value, using the given
orderBy directive or priority as default. |
| Query | |
| Query |
endBefore(boolean value)
Creates a query constrained to only return child nodes with a value less than the given value,
using the given
orderBy directive or priority as default. |
| Query | |
| Query | |
| Query |
endBefore(double value)
Creates a query constrained to only return child nodes with a value less than the given value,
using the given
orderBy directive or priority as default. |
| Query | |
| Query | |
| Query | |
| Query |
equalTo(double value)
Creates a query constrained to only return child nodes with the given value.
|
| Query | |
| Query | |
| Query | |
| Query |
equalTo(boolean value)
Creates a query constrained to only return child nodes with the given value.
|
| Task<DataSnapshot> |
get()
Gets the server values for this query.
|
| DatabaseReference |
getRef()
|
| void |
keepSynced(boolean keepSynced)
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.
|
| Query |
limitToFirst(int limit)
Creates a query with limit and anchor it to the start of the window.
|
| Query |
limitToLast(int limit)
Creates a query with limit and anchor it to the end of the window.
|
| Query |
orderByChild(String path)
Creates a query in which child nodes are ordered by the values of the specified path.
|
| Query |
orderByKey()
Creates a query in which child nodes are ordered by their keys.
|
| Query |
orderByPriority()
Creates a query in which child nodes are ordered by their priorities.
|
| Query |
orderByValue()
Creates a query in which nodes are ordered by their value
|
| void | |
| void | |
| Query |
startAfter(boolean value, String key)
Creates a query constrained to only return child nodes with a value greater than or equal to
the given value, using the given
orderBy directive or priority as default, and
additionally only child nodes with a key greater than the given key. |
| Query |
startAfter(boolean value)
Creates a query constrained to only return child nodes with a value greater than the given
value, using the given
orderBy directive or priority as default. |
| Query |
startAfter(String value, String key)
Creates a query constrained to only return child nodes with a value greater or equal to the
given value, using the given
orderBy directive or priority as default, and additionally
only child nodes with a key greater than the given key. |
| Query |
startAfter(double value)
Creates a query constrained to only return child nodes with a value greater than the given
value, using the given
orderBy directive or priority as default. |
| Query |
startAfter(String value)
Creates a query constrained to only return child nodes with a value greater than the given
value, using the given
orderBy directive or priority as default. |
| Query |
startAfter(double value, String key)
Creates a query constrained to only return child nodes with a value greater than or equal to
the given value, using the given
orderBy directive or priority as default, and
additionally only child nodes with a key greater than the given key. |
| Query |
startAt(double value)
Creates a query constrained to only return child nodes with a value greater than or equal to
the given value, using the given
orderBy directive or priority as default. |
| Query | |
| Query | |
| Query | |
| Query |
startAt(boolean value)
Creates a query constrained to only return child nodes with a value greater than or equal to
the given value, using the given
orderBy directive or priority as default. |
| Query |
Add a listener for child events occurring at this location. When child locations are added, removed, changed, or moved, the listener will be triggered for the appropriate event
| listener | The listener to be called with changes |
|---|
Add a listener for a single change in the data at this location. This listener will be triggered once with the value of the data at the location.
| listener | The listener to be called with the data |
|---|
Add a listener for changes in the data at this location. Each time the data changes, your listener will be called with an immutable snapshot of the data.
| listener | The listener to be called with changes |
|---|
Creates a query constrained to only return child nodes with a value less than or equal to the
given value, using the given orderBy directive or priority as default, and additionally
only child nodes with a key less than or equal to the given key.
| value | The value to end at, inclusive |
|---|---|
| key | The key to end at, inclusive |
Creates a query constrained to only return child nodes with a value less than or equal to the
given value, using the given orderBy directive or priority as default.
| value | The value to end at, inclusive |
|---|
Creates a query constrained to only return child nodes with a value less than or equal to the
given value, using the given orderBy directive or priority as default, and additionally
only child nodes with a key less than or equal to the given key.
| value | The value to end at, inclusive |
|---|---|
| key | The key to end at, inclusive |
Creates a query constrained to only return child nodes with a value less than or equal to the
given value, using the given orderBy directive or priority as default.
| value | The value to end at, inclusive |
|---|
Creates a query constrained to only return child nodes with a value less than or equal to the
given value, using the given orderBy directive or priority as default.
| value | The value to end at, inclusive |
|---|
Creates a query constrained to only return child nodes with a value less than or equal to the
given value, using the given orderBy directive or priority as default, and additionally
only child nodes with a key less than or equal to the given key.
| value | The value to end at, inclusive |
|---|---|
| key | The key to end at, inclusive |
Creates a query constrained to only return child nodes with a value less than the given value,
using the given orderBy directive or priority as default.
| value | The value to end at, exclusive |
|---|
Creates a query constrained to only return child nodes with a value less than or equal to the
given value, using the given orderBy directive or priority as default, and additionally
only child nodes with a key less than the given key.
| value | The value to end at |
|---|---|
| key | The key to end at, exclusive |
Creates a query constrained to only return child nodes with a value less than or equal to the
given value, using the given orderBy directive or priority as default, and additionally
only child nodes with a key less than the given key.
| value | The value to end at |
|---|---|
| key | The key to end at, exclusive |
Creates a query constrained to only return child nodes with a value less than the given value,
using the given orderBy directive or priority as default.
| value | The value to end at, exclusive |
|---|
Creates a query constrained to only return child nodes with a value less than the given value,
using the given orderBy directive or priority as default.
| value | The value to end at, exclusive |
|---|
Creates a query constrained to only return child nodes with a value less than or equal to the
given value, using the given orderBy directive or priority as default, and additionally
only child nodes with a key less than the given key.
| value | The value to end at |
|---|---|
| key | The key to end at, exclusive |
Creates a query constrained to only return the child node with the given key and value. Note that there is at most one such child as names are unique.
| value | The value to query for |
|---|---|
| key | The key of the child |
Creates a query constrained to only return child nodes with the given value.
| value | The value to query for |
|---|
Creates a query constrained to only return the child node with the given key and value. Note that there is at most one such child as keys are unique.
| value | The value to query for |
|---|---|
| key | The key of the child |
Creates a query constrained to only return child nodes with the given value.
| value | The value to query for |
|---|
Creates a query constrained to only return the child node with the given key and value. Note that there is at most one such child as keys are unique.
| value | The value to query for |
|---|---|
| key | The name of the child |
Creates a query constrained to only return child nodes with the given value.
| value | The value to query for |
|---|
Gets the server values for this query. Updates the cache and raises events if successful. If not connected, falls back to a locally-cached value.
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. Additionally, while a location is kept synced, it will not be evicted from the persistent disk cache.
| keepSynced | Pass `true` to keep this location synchronized, pass `false` to stop synchronization. |
|---|
Creates a query with limit and anchor it to the start of the window.
| limit | The maximum number of child nodes to return |
|---|
Creates a query with limit and anchor it to the end of the window.
| limit | The maximum number of child nodes to return |
|---|
Creates a query in which child nodes are ordered by the values of the specified path.
| path | The path to the child node to use for sorting |
|---|
Creates a query in which child nodes are ordered by their keys.
Creates a query in which child nodes are ordered by their priorities.
Creates a query in which nodes are ordered by their value
Remove the specified listener from this location.
| listener | The listener to remove |
|---|
Remove the specified listener from this location.
| listener | The listener to remove |
|---|
Creates a query constrained to only return child nodes with a value greater than or equal to
the given value, using the given orderBy directive or priority as default, and
additionally only child nodes with a key greater than the given key.
| value | The value to start at |
|---|---|
| key | The key to start at, exclusive |
Creates a query constrained to only return child nodes with a value greater than the given
value, using the given orderBy directive or priority as default.
| value | The value to start at, exclusive |
|---|
Creates a query constrained to only return child nodes with a value greater or equal to the
given value, using the given orderBy directive or priority as default, and additionally
only child nodes with a key greater than the given key.
| value | The value to start at |
|---|---|
| key | The key to start at, exclusive |
Creates a query constrained to only return child nodes with a value greater than the given
value, using the given orderBy directive or priority as default.
| value | The value to start at, exclusive |
|---|
Creates a query constrained to only return child nodes with a value greater than the given
value, using the given orderBy directive or priority as default.
| value | The value to start at, exclusive |
|---|
Creates a query constrained to only return child nodes with a value greater than or equal to
the given value, using the given orderBy directive or priority as default, and
additionally only child nodes with a key greater than the given key.
| value | The value to start at |
|---|---|
| key | The key name to start at, exclusive |
Creates a query constrained to only return child nodes with a value greater than or equal to
the given value, using the given orderBy directive or priority as default.
| value | The value to start at, inclusive |
|---|
Creates a query constrained to only return child nodes with a value greater than or equal to
the given value, using the given orderBy directive or priority as default, and
additionally only child nodes with a key greater than or equal to the given key.
| value | The priority to start at, inclusive |
|---|---|
| key | The key to start at, inclusive |
Creates a query constrained to only return child nodes with a value greater than or equal to
the given value, using the given orderBy directive or priority as default.
| value | The value to start at, inclusive |
|---|
Creates a query constrained to only return child nodes with a value greater than or equal to
the given value, using the given orderBy directive or priority as default, and
additionally only child nodes with a key greater than or equal to the given key.
| value | The priority to start at, inclusive |
|---|---|
| key | The key name to start at, inclusive |
Creates a query constrained to only return child nodes with a value greater than or equal to
the given value, using the given orderBy directive or priority as default.
| value | The value to start at, inclusive |
|---|
Creates a query constrained to only return child nodes with a value greater than or equal to
the given value, using the given orderBy directive or priority as default, and
additionally only child nodes with a key greater than or equal to the given key.
| value | The priority to start at, inclusive |
|---|---|
| key | The key to start at, inclusive |