Query<T extends QueryJsImpl> class

A Query sorts and filters the data at a database location so only a subset of the child data is included. This can be used to order a collection of data by some attribute as well as 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 more of the filter methods defined in this class.

See: firebase.google.com/docs/reference/js/firebase.database.Query.

Implementers

Constructors

Query.fromJsObject(T jsObject)
Creates a new Query from a jsObject.

Properties

hashCode int
The hash code for this object.
no setterinherited
jsObject → T
JS object.
finalinherited
onChildAdded Stream<QueryEvent>
Stream for a child_added event. Event is triggered once for each initial child at location, and then again every time a new child is added.
no setter
onChildChanged Stream<QueryEvent>
Stream for a child_changed event. Event is triggered when the data stored in a child (or any of its descendants) changes. Single child_changed event may represent multiple changes to the child.
no setter
onChildMoved Stream<QueryEvent>
Stream for a child_moved event. Event is triggered when a child's priority changes such that its position relative to its siblings changes.
no setter
onChildRemoved Stream<QueryEvent>
Stream for a child_removed event. Event is triggered once every time a child is removed.
no setter
onValue Stream<QueryEvent>
Stream for a value event. Event is triggered once with the initial data stored at location, and then again each time the data changes.
no setter
ref DatabaseReference<ReferenceJsImpl>
DatabaseReference to the Query's location.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

endAt(dynamic value, [String? key]) Query<QueryJsImpl>
Returns a Query with the ending point value. The ending point is inclusive.
equalTo(dynamic value, [String? key]) Query<QueryJsImpl>
Returns a Query which includes children which match the specified value.
isEqual(Query<QueryJsImpl> other) bool
Returns true if the current and other queries are equal - they represent the exactly same location, have the same query parameters, and are from the same instance of App. Equivalent queries share the same sort order, limits, starting and ending points.
limitToFirst(int limit) Query<QueryJsImpl>
Returns a new Query limited to the first specific number of children provided by limit.
limitToLast(int limit) Query<QueryJsImpl>
Returns a new Query limited to the last specific number of children provided by limit.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
once(String eventType) Future<QueryEvent>
Listens for exactly one eventType and then stops listening.
orderByChild(String path) Query<QueryJsImpl>
Returns a new Query ordered by the specified child path.
orderByKey() Query<QueryJsImpl>
Returns a new Query ordered by key.
orderByPriority() Query<QueryJsImpl>
Returns a new Query ordered by priority.
orderByValue() Query<QueryJsImpl>
Returns a new Query ordered by child values.
startAt(dynamic value, [String? key]) Query<QueryJsImpl>
Returns a Query with the starting point value. The starting point is inclusive.
toJson() → dynamic
Returns a JSON-serializable representation of this object.
toString() String
Returns a String representation of Query object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited