React Native Firebase
    Preparing search index...

    Module @react-native-firebase/database

    Functions

    child

    Gets a Reference for the location at the specified relative path.

    connectDatabaseEmulator

    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.

    enableLogging

    Logs debugging information to the console. Not implemented on native.

    endAt

    Creates a QueryConstraint with the specified ending point.

    endBefore

    Creates a QueryConstraint with the specified ending point (exclusive).

    equalTo

    Creates a QueryConstraint that includes children that match the specified value.

    forceLongPolling

    Force the use of longPolling instead of websockets. This will be ignored if websocket protocol is used in databaseURL.

    forceWebSockets

    Force the use of websockets instead of longPolling.

    get

    Gets the most up-to-date result for this query.

    getDatabase

    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.

    getServerTime

    Returns the current Firebase Database server time as a JavaScript Date object.

    goOffline

    Disconnects from the server (all Database operations will be completed offline).

    goOnline

    Reconnects to the server and synchronizes the offline Database state with the server state.

    increment

    Returns a placeholder value that can be used to atomically increment the current database value by the provided delta.

    keepSynced

    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.

    limitToFirst

    Creates a new QueryConstraint that if limited to the first specific number of children.

    limitToLast

    Creates a new QueryConstraint that is limited to return only the last specified number of children.

    off

    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

    onChildAdded

    Listens for data changes at a particular location.

    onChildChanged

    Listens for data changes at a particular location.

    onChildMoved

    Listens for data changes at a particular location.

    onChildRemoved

    Listens for data changes at a particular location.

    onDisconnect

    Returns an OnDisconnect object - see Enabling Offline Capabilities in JavaScript for more information on how to use it.

    onValue

    Listens for data changes at a particular location.

    orderByChild

    Creates a new QueryConstraint that orders by the specified child key.

    orderByKey

    Creates a new QueryConstraint that orders by the key.

    orderByPriority

    Creates a new QueryConstraint that orders by priority.

    orderByValue

    Creates a new QueryConstraint that orders by value.

    push

    Generates a new child location using a unique key and returns its Reference.

    query

    Creates a new immutable instance of Query that is extended to also include additional query constraints.

    ref

    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.

    refFromURL

    Generates a Reference from a database URL. Note domain must be the same. Any query parameters are stripped as per the web SDK.

    remove

    Removes the data at this Database location.

    runTransaction

    Atomically modifies the data at this location.

    serverTimestamp

    Returns a placeholder value for auto-populating the current timestamp (time since the Unix epoch, in milliseconds) as determined by the Firebase servers.

    set

    Writes data to this Database location.

    setLoggingEnabled

    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.

    setPersistenceCacheSizeBytes

    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.

    setPersistenceEnabled

    Sets whether persistence is enabled for all database calls for the current app instance.

    setPriority

    Sets a priority for the data at this Database location.

    setWithPriority

    Writes data the Database location. Like set() but also specifies the priority for that data.

    startAfter

    Creates a QueryConstraint with the specified starting point (exclusive).

    startAt

    Creates a QueryConstraint with the specified starting point.

    update

    Writes multiple values to the Database at once.

    Interfaces

    ListenOptions
    QueryConstraint

    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.

    ThenableReference

    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.

    TransactionOptions

    An options object to configure transactions.

    Namespaces

    FirebaseDatabaseTypes

    Firebase Database package for React Native.

    Type Aliases

    DatabaseReference
    DataSnapshot
    OnDisconnect
    Query
    QueryConstraintType

    Describes the different query constraints available in this SDK.

    TransactionResult
    Unsubscribe

    Variables

    default
    firebase
    ServerValue

    Server specific values.