Reference documentation and code samples for the Cloud Firestore V1 Client class Database.
A Cloud Firestore Database.
Currently only one database is allowed per cloud project; this database
must have a database_id
of '(default)'.
Generated from protobuf message google.firestore.admin.v1.Database
Namespace
Google \ Cloud \ Firestore \ Admin \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
The resource name of the Database. Format: projects/{project}/databases/{database}
↳ location_id
string
The location of the database. Available locations are listed at https://cloud.google.com/firestore/docs/locations .
↳ type
int
The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.
↳ concurrency_mode
int
The concurrency control mode to use for this database.
↳ version_retention_period
Google\Protobuf\Duration
Output only. The period during which past versions of data are retained in the database. Any read
or query
can specify a read_time
within this window, and will read the state of the database at that time. If the PITR feature is enabled, the retention period is 7 days. Otherwise, the retention period is 1 hour.
↳ earliest_version_time
Google\Protobuf\Timestamp
Output only. The earliest timestamp at which older versions of the data can be read from the database. See [version_retention_period] above; this field is populated with now - version_retention_period
. This value is continuously updated, and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
↳ point_in_time_recovery_enablement
int
Whether to enable the PITR feature on this database.
↳ app_engine_integration_mode
int
The App Engine integration mode to use for this database.
↳ key_prefix
string
Output only. The key_prefix for this database. This key_prefix is used, in combination with the project id ("
↳ etag
string
This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
getName
The resource name of the Database.
Format: projects/{project}/databases/{database}
string
setName
The resource name of the Database.
Format: projects/{project}/databases/{database}
var
string
$this
getLocationId
The location of the database. Available locations are listed at https://cloud.google.com/firestore/docs/locations .
string
setLocationId
The location of the database. Available locations are listed at https://cloud.google.com/firestore/docs/locations .
var
string
$this
getType
The type of the database.
See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.
int
setType
The type of the database.
See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.
var
int
$this
getConcurrencyMode
The concurrency control mode to use for this database.
int
setConcurrencyMode
The concurrency control mode to use for this database.
var
int
$this
getVersionRetentionPeriod
Output only. The period during which past versions of data are retained in the database.
Any read
or query
can specify
a read_time
within this window, and will read the state of the database
at that time.
If the PITR feature is enabled, the retention period is 7 days. Otherwise,
the retention period is 1 hour.
hasVersionRetentionPeriod
clearVersionRetentionPeriod
setVersionRetentionPeriod
Output only. The period during which past versions of data are retained in the database.
Any read
or query
can specify
a read_time
within this window, and will read the state of the database
at that time.
If the PITR feature is enabled, the retention period is 7 days. Otherwise,
the retention period is 1 hour.
$this
getEarliestVersionTime
Output only. The earliest timestamp at which older versions of the data can
be read from the database. See [version_retention_period] above; this field
is populated with now - version_retention_period
.
This value is continuously updated, and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
hasEarliestVersionTime
clearEarliestVersionTime
setEarliestVersionTime
Output only. The earliest timestamp at which older versions of the data can
be read from the database. See [version_retention_period] above; this field
is populated with now - version_retention_period
.
This value is continuously updated, and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
$this
getPointInTimeRecoveryEnablement
Whether to enable the PITR feature on this database.
int
setPointInTimeRecoveryEnablement
Whether to enable the PITR feature on this database.
var
int
$this
getAppEngineIntegrationMode
The App Engine integration mode to use for this database.
int
setAppEngineIntegrationMode
The App Engine integration mode to use for this database.
var
int
$this
getKeyPrefix
Output only. The key_prefix for this database. This key_prefix is used, in combination with the project id ("
This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).
string
setKeyPrefix
Output only. The key_prefix for this database. This key_prefix is used, in combination with the project id ("
This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).
var
string
$this
getEtag
This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
string
setEtag
This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
var
string
$this