A message that can hold any of the supported value types and associated metadata.
JSON representation |
---|
{ "meaning": integer, "excludeFromIndexes": boolean, // Union field |
Fields | |
---|---|
meaning |
The |
excludeFromIndexes |
If the value should be excluded from all indexes including those defined explicitly. |
Union field value_type . Must have a value set. value_type can be only one of the following: |
|
nullValue |
A null value. |
booleanValue |
A boolean value. |
integerValue |
An integer value. |
doubleValue |
A double value. |
timestampValue |
A timestamp value. When stored in the Datastore, precise only to microseconds; any additional precision is rounded down. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
keyValue |
A key value. |
stringValue |
A UTF-8 encoded string value. When |
blobValue |
A blob value. May have at most 1,000,000 bytes. When A base64-encoded string. |
geoPointValue |
A geo point value representing a point on the surface of Earth. |
entityValue |
An entity value.
|
arrayValue |
An array value. Cannot contain another array value. A |
Key
A unique identifier for an entity. If a key's partition ID or any of its path kinds or names are reserved/read-only, the key is reserved/read-only. A reserved/read-only key is forbidden in certain documented contexts.
JSON representation |
---|
{ "partitionId": { object ( |
Fields | |
---|---|
partitionId |
Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition. |
path[] |
The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors. An entity path is always fully complete: all of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. For example, the last path element of the key of A path can never be empty, and a path can have at most 100 elements. |
PartitionId
A partition ID identifies a grouping of entities. The grouping is always by project and namespace, however the namespace ID may be empty.
A partition ID contains several dimensions: project ID and namespace ID.
Partition dimensions:
- May be
""
. - Must be valid UTF-8 bytes.
- Must have values that match regex
[A-Za-z\d\.\-_]{1,100}
If the value of any dimension matches regex__.*__
, the partition is reserved/read-only. A reserved/read-only partition ID is forbidden in certain documented contexts.
Foreign partition IDs (in which the project ID does not match the context project ID ) are discouraged. Reads and writes of foreign partition IDs may fail if the project is not in an active state.
JSON representation |
---|
{ "projectId": string, "databaseId": string, "namespaceId": string } |
Fields | |
---|---|
projectId |
The ID of the project to which the entities belong. |
databaseId |
If not empty, the ID of the database to which the entities belong. |
namespaceId |
If not empty, the ID of the namespace to which the entities belong. |
PathElement
A (kind, ID/name) pair used to construct a key path.
If either name or ID is set, the element is complete. If neither is set, the element is incomplete.
JSON representation |
---|
{ "kind": string, // Union field |
Fields | |
---|---|
kind |
The kind of the entity. A kind matching regex Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as |
Union field id_type . The type of ID. id_type can be only one of the following: |
|
id |
The auto-allocated ID of the entity. Never equal to zero. Values less than zero are discouraged and may not be supported in the future. |
name |
The name of the entity. A name matching regex Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as |
Entity
A Datastore data object.
Must not exceed 1 MiB - 4 bytes.
JSON representation |
---|
{ "key": { object ( |
Fields | |
---|---|
key |
The entity's key. An entity must have a key, unless otherwise documented (for example, an entity in |
properties |
The entity's properties. The map's keys are property names. A property name matching regex An object containing a list of |