ไปที่คอนโซล

firebase::database

Namespace for the Firebase Realtime Database C++ SDK.

Summary

Enumerations

Error{
  kErrorNone = 0,
  kErrorDisconnected,
  kErrorExpiredToken,
  kErrorInvalidToken,
  kErrorMaxRetries,
  kErrorNetworkError,
  kErrorOperationFailed,
  kErrorOverriddenBySet,
  kErrorPermissionDenied,
  kErrorUnavailable,
  kErrorUnknownError,
  kErrorWriteCanceled,
  kErrorInvalidVariantType,
  kErrorConflictingOperationInProgress,
  kErrorTransactionAbortedByUser
}
enum
Error code returned by Firebase Realtime Database C++ functions.
TransactionResult{
  kTransactionResultSuccess,
  kTransactionResultAbort
}
enum
Specifies whether the transaction succeeded or not.

Typedefs

DoTransaction)(MutableData *data) typedef
Your own transaction handler, which the Firebase Realtime Database library may call multiple times to apply changes to the data, and should return success or failure depending on whether it succeeds.
DoTransactionFunction typedef
std::function< TransactionResult(MutableData *data)>
Your own transaction handler function or lambda, which the Firebase Realtime Database library may call multiple times to apply changes to the data, and should return success or failure depending on whether it succeeds.
DoTransactionWithContext)(MutableData *data, void *context) typedef
Your own transaction handler, which the Firebase Realtime Database library may call multiple times to apply changes to the data, and should return success or failure depending on whether it succeeds.

Functions

GetErrorMessage(Error error)
const char *
Get the human-readable error message corresponding to an error code.
ServerTimestamp()
const Variant &
Get a server-populated value corresponding to the current timestamp.
operator==(const DatabaseReference & lhs, const DatabaseReference & rhs)
bool
Compares two DatabaseReference instances.
operator==(const Query & lhs, const Query & rhs)
bool
Compares two Query instances.

Classes

firebase::database::ChildListener

Child listener interface.

firebase::database::DataSnapshot

A DataSnapshot instance contains data from a Firebase Database location.

firebase::database::Database

Entry point for the Firebase Realtime Database C++ SDK.

firebase::database::DatabaseReference

DatabaseReference represents a particular location in your Database and can be used for reading or writing data to that Database location.

firebase::database::DisconnectionHandler

Allows you to register server-side actions to occur when the client disconnects.

firebase::database::MutableData

Instances of this class encapsulate the data and priority at a location.

firebase::database::Query

The Query class is used for reading data.

firebase::database::ValueListener

Value listener interface.

Enumerations

Error

 Error

Error code returned by Firebase Realtime Database C++ functions.

Properties
kErrorConflictingOperationInProgress

An operation that conflicts with this one is already in progress.

For example, calling SetValue and SetValueAndPriority on a DatabaseReference is not allowed.

kErrorDisconnected

The operation had to be aborted due to a network disconnect.

kErrorExpiredToken

The supplied auth token has expired.

kErrorInvalidToken

The specified authentication token is invalid.

kErrorInvalidVariantType

You specified an invalid Variant type for a field.

For example, a DatabaseReference's Priority and the keys of a Map must be of scalar type (MutableString, StaticString, Int64, Double).

kErrorMaxRetries

The transaction had too many retries.

kErrorNetworkError

The operation could not be performed due to a network error.

kErrorNone

The operation was a success, no error occurred.