Ir a la consola

Query

public class Query extends Object
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.

Public Method Summary

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
endAt(String value, String key)
Create 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 key less than or equal to the given key.
Query
endAt(String value)
Create 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(double value, String key)
Create 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.
Query
endAt(double value)
Create 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)
Create 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, String key)
Create 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.
Query
equalTo(String value, String key)
Create a query constrained to only return the child node with the given key and value.
Query
equalTo(double value)
Create a query constrained to only return child nodes with the given value
Query
equalTo(double value, String key)
Create a query constrained to only return the child node with the given key and value.
Query
equalTo(String value)
Create a query constrained to only return child nodes with the given value
Query
equalTo(boolean value, String key)
Create a query constrained to only return the child node with the given key and value.
Query
equalTo(boolean value)
Create a query constrained to only return child nodes with the given value.
DatabaseReference