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.

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.

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.

Create 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.

Create 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.

Create 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.

Returns

Create a reference to an auto-generated child location. The child key is generated
client-side and incorporates an estimate of the server's time for sorting purposes.
Locations generated on a single client will be sorted in the order that they are
created, and will be sorted approximately in order across all clients.

Parameters

Set a priority for the data at this Database location. Priorities can be used to
provide a custom ordering for the children at a location (if no priorities are
specified, the children are ordered by key).

You cannot set a priority on an empty location. For this reason setValue(data,
priority) should be used when setting initial data with a specific priority and
setPriority should be used when updating the priority of existing data.

Children are sorted based on this priority using the following rules:

Children with no priority come first.

Children with a number as their priority come next. They are sorted numerically
by priority (small to large).

Children with a string as their priority come last. They are sorted
lexicographically by priority.

Whenever two children have the same priority (including no priority), they are
sorted by key. Numeric keys come first (sorted numerically), followed by the
remaining keys (sorted lexicographically).

Note that numerical priorities are parsed and ordered as IEEE 754 double-precision
floating-point numbers. Keys are always stored as strings and are treated as numeric
only when they can be parsed as a 32-bit integer.

Parameters

priority

The priority to set at the specified location or null to clear the existing
priority

Set a priority for the data at this Database location. Priorities can be used to
provide a custom ordering for the children at a location (if no priorities are
specified, the children are ordered by key).

You cannot set a priority on an empty location. For this reason setValue(data,
priority) should be used when setting initial data with a specific priority and
setPriority should be used when updating the priority of existing data.

Children are sorted based on this priority using the following rules:

Children with no priority come first.

Children with a number as their priority come next. They are sorted numerically
by priority (small to large).

Children with a string as their priority come last. They are sorted
lexicographically by priority.

Whenever two children have the same priority (including no priority), they are
sorted by key. Numeric keys come first (sorted numerically), followed by the
remaining keys (sorted lexicographically).

Note that numerical priorities are parsed and ordered as IEEE 754 double-precision
floating-point numbers. Keys are always stored as strings and are treated as numeric
only when they can be parsed as a 32-bit integer.

Parameters

priority

The priority to set at the specified location or null to clear the existing
priority

Set the data at this location to the given value. Passing null to setValue() will
delete the data at the specified location. The native types accepted by this method for
the value correspond to the JSON types:

Boolean

Long

Double

String

Map<String, Object>

List<Object>

In addition, you can set instances of your own class into this location, provided they
satisfy the following constraints:

The class must have a default constructor that takes no arguments

The class must define public getters for the properties to be assigned.
Properties without a public getter will be set to their default value when an
instance is deserialized

Generic collections of objects that satisfy the above constraints are also permitted,
i.e. Map<String, MyPOJO>, as well as null values.

Set the data and priority to the given values. Passing null to setValue() will
delete the data at the specified location. The native types accepted by this method for
the value correspond to the JSON types:

Boolean

Long

Double

String

Map<String, Object>

List<Object>

In addition, you can set instances of your own class into this location, provided they
satisfy the following constraints:

The class must have a default constructor that takes no arguments

The class must define public getters for the properties to be assigned.
Properties without a public getter will be set to their default value when an
instance is deserialized

Generic collections of objects that satisfy the above constraints are also permitted,
i.e. Map<String, MyPOJO>, as well as null values.

Parameters

value

The value to set at this location or null to delete the existing data

priority

The priority to set at this location or null to clear the existing
priority

Returns

Set the data at this location to the given value. Passing null to setValue() will
delete the data at the specified location. The native types accepted by this method for
the value correspond to the JSON types:

Boolean

Long

Double

String

Map<String, Object>

List<Object>

In addition, you can set instances of your own class into this location, provided they
satisfy the following constraints:

The class must have a default constructor that takes no arguments

The class must define public getters for the properties to be assigned.
Properties without a public getter will be set to their default value when an
instance is deserialized

Generic collections of objects that satisfy the above constraints are also permitted,
i.e. Map<String, MyPOJO>, as well as null values.