Modify this Database instance to communicate with the Firebase Database emulator. This must be called synchronously immediately following the first call to firebase.database(). Do not use with production credentials as emulator traffic is not encrypted.
Logs debugging information to the console. Not implemented on native.
Creates a QueryConstraint with the specified ending point.
Creates a QueryConstraint with the specified ending point (exclusive).
Creates a QueryConstraint that includes children that match the specified value.
Force the use of longPolling instead of websockets. This will be ignored if websocket protocol is used in databaseURL.
Force the use of websockets instead of longPolling.
Gets the most up-to-date result for this query.
Returns the instance of the Realtime Database SDK that is associated with the provided FirebaseApp. Initializes a new instance with default settings if no instance exists or if the existing instance uses a custom database URL.
Returns the current Firebase Database server time as a JavaScript Date object.
Disconnects from the server (all Database operations will be completed offline).
Reconnects to the server and synchronizes the offline Database state with the server state.
Returns a placeholder value that can be used to atomically increment the current database value by the provided delta.
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.
Creates a new QueryConstraint that if limited to the first specific number
of children.
Creates a new QueryConstraint that is limited to return only the last
specified number of children.
Detaches a callback previously attached with the corresponding on*() (onValue, onChildAdded) listener. Note: This is not the recommended way to remove a listener. Instead, please use the returned callback function from the respective on* callbacks. Detach a callback previously attached with on*(). Calling off() on a parent listener will not automatically remove listeners registered on child nodes, off() must also be called on any child listeners to remove the callback. If a callback is not specified, all callbacks for the specified eventType will be removed. Similarly, if no eventType is specified, all callbacks for the Reference will be removed. Individual listeners can also be removed by invoking their unsubscribe callbacks. Note: Not implemented on native
Listens for data changes at a particular location.
Listens for data changes at a particular location.
Listens for data changes at a particular location.
Listens for data changes at a particular location.
Returns an OnDisconnect object - see
Enabling Offline Capabilities in JavaScript
for more information on how to use it.
Listens for data changes at a particular location.
Creates a new QueryConstraint that orders by the specified child key.
Creates a new QueryConstraint that orders by the key.
Creates a new QueryConstraint that orders by priority.
Creates a new QueryConstraint that orders by value.
Generates a new child location using a unique key and returns its
Reference.
Creates a new immutable instance of Query that is extended to also include
additional query constraints.
Returns a Reference representing the location in the Database corresponding to the provided path.
If no path is provided, the Reference will point to the root of the Database.
Generates a Reference from a database URL. Note domain must be the same. Any query parameters are stripped as per the web SDK.
Removes the data at this Database location.
Atomically modifies the data at this location.
Returns a placeholder value for auto-populating the current timestamp (time since the Unix epoch, in milliseconds) as determined by the Firebase servers.
Writes data to this Database location.
Sets the native logging level for the database module. By default, only warnings and errors are logged natively. Setting this to true will log all database events.
By default, Firebase Database will use up to 10MB of disk space to cache data. If the cache grows beyond this size, Firebase Database will start removing data that hasn't been recently used. If you find that your application caches too little or too much data, call this method to change the cache size. This method must be called before creating your first Database reference and only needs to be called once per application.
Sets whether persistence is enabled for all database calls for the current app instance.
Sets a priority for the data at this Database location.
Writes data the Database location. Like set() but also specifies the
priority for that data.
Creates a QueryConstraint with the specified starting point (exclusive).
Creates a QueryConstraint with the specified starting point.
Writes multiple values to the Database at once.
A QueryConstraint is used to narrow the set of documents returned by a
Database query. QueryConstraints are created by invoking endAt,
endBefore, startAt, startAfter, limitToFirst, limitToLast, orderByChild,
orderByChild, orderByKey , orderByPriority ,
orderByValue or equalTo and
can then be passed to query to create a new query instance that
also contains this QueryConstraint.
A Promise that can also act as a DatabaseReference when returned by
push. The reference is available immediately and the Promise resolves
as the write to the backend completes.
An options object to configure transactions.
Firebase Database package for React Native.
Describes the different query constraints available in this SDK.
Server specific values.
Gets a
Referencefor the location at the specified relative path.