DatabaseReference<T extends ReferenceJsImpl> class

A DatabaseReference represents a specific location in database and can be used for reading or writing data to that database location.

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

Inheritance
Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
jsObject → T
JS object.
finalinherited
key String
The last part of the current path. It is null in case of root DatabaseReference.
no setter
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 setterinherited
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 setterinherited
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 setterinherited
onChildRemoved Stream<QueryEvent>
Stream for a child_removed event. Event is triggered once every time a child is removed.
no setterinherited
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 setterinherited
parent DatabaseReference<ReferenceJsImpl>
The parent location of a DatabaseReference.
no setter
ref DatabaseReference<ReferenceJsImpl>
DatabaseReference to the Query's location.
no setterinherited
root DatabaseReference<ReferenceJsImpl>
The root location of a DatabaseReference.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

child(String path) DatabaseReference<ReferenceJsImpl>
Returns child DatabaseReference from provided relative path.
endAt(dynamic value, [String? key]) Query<QueryJsImpl>
Returns a Query with the ending point value. The ending point is inclusive.
inherited
equalTo(dynamic value, [String? key]) Query<QueryJsImpl>
Returns a Query which includes children which match the specified value.
inherited
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.
inherited
limitToFirst(int limit) Query<QueryJsImpl>
Returns a new Query limited to the first specific number of children provided by limit.
inherited
limitToLast(int limit) Query<QueryJsImpl>
Returns a new Query limited to the last specific number of children provided by limit.
inherited
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.
inherited
onDisconnect() OnDisconnect
Returns OnDisconnect object.
orderByChild(String path) Query<QueryJsImpl>
Returns a new Query ordered by the specified child path.
inherited
orderByKey() Query<QueryJsImpl>
Returns a new Query ordered by key.
inherited
orderByPriority() Query<QueryJsImpl>
Returns a new Query ordered by priority.
inherited
orderByValue() Query<QueryJsImpl>
Returns a new Query ordered by child values.
inherited
push([dynamic value]) ThenableReference
Pushes provided value to the actual location.
remove() Future
Removes data from actual database location.
set(dynamic value) Future
Sets data at actual database location to provided value. Overwrites any existing data at actual location and all child locations.
setPriority(dynamic priority) Future
Sets a priority for data at actual database location.
setWithPriority(dynamic newVal, dynamic newPriority) Future
Sets data newVal at actual database location with provided priority newPriority.
startAt(dynamic value, [String? key]) Query<QueryJsImpl>
Returns a Query with the starting point value. The starting point is inclusive.
inherited
toJson() → dynamic
Returns a JSON-serializable representation of this object.
inherited
toString() String
Returns a String representation of Query object.
inherited
transaction(dynamic transactionUpdate(dynamic), [bool applyLocally = true]) Future<Transaction>
Atomically updates data at actual database location.
update(dynamic values) Future
Updates data with values at actual database location.

Operators

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

Static Methods

getInstance(ReferenceJsImpl jsObject) DatabaseReference<ReferenceJsImpl>
Creates a new DatabaseReference from a jsObject.