v1

v1

Source:

Members

(static) Direction :number

The sort direction.

Properties:
Name Type Description
DIRECTION_UNSPECIFIED number

Unspecified. This value must not be used.

ASCENDING number

Ascending.

DESCENDING number

Descending.

Source:

(static) Mode :number

The modes available for commits.

Properties:
Name Type Description
MODE_UNSPECIFIED number

Unspecified. This value must not be used.

TRANSACTIONAL number

Transactional: The mutations are either all applied, or none are applied. Learn about transactions here.

NON_TRANSACTIONAL number

Non-transactional: The mutations may not apply as all or none.

Source:

(static) MoreResultsType :number

The possible values for the more_results field.

Properties:
Name Type Description
MORE_RESULTS_TYPE_UNSPECIFIED number

Unspecified. This value is never used.

NOT_FINISHED number

There may be additional batches to fetch from this query.

MORE_RESULTS_AFTER_LIMIT number

The query is finished, but there may be more results after the limit.

MORE_RESULTS_AFTER_CURSOR number

The query is finished, but there may be more results after the end cursor.

NO_MORE_RESULTS number

The query is finished, and there are no more results.

Source:

(static) Operator :number

A composite filter operator.

Properties:
Name Type Description
OPERATOR_UNSPECIFIED number

Unspecified. This value must not be used.

AND number

The results are required to satisfy each of the combined filters.

Source:

(static) Operator :number

A property filter operator.

Properties:
Name Type Description
OPERATOR_UNSPECIFIED number

Unspecified. This value must not be used.

LESS_THAN number

Less than.

LESS_THAN_OR_EQUAL number

Less than or equal.

GREATER_THAN number

Greater than.

GREATER_THAN_OR_EQUAL number

Greater than or equal.

EQUAL number

Equal.

HAS_ANCESTOR number

Has ancestor.

Source:

(static) ReadConsistency :number

The possible values for read consistencies.

Properties:
Name Type Description
READ_CONSISTENCY_UNSPECIFIED number

Unspecified. This value must not be used.

STRONG number

Strong consistency.

EVENTUAL number

Eventual consistency.

Source:

(static) ResultType :number

Specifies what data the 'entity' field contains. A ResultType is either implied (for example, in LookupResponse.missing from datastore.proto, it is always KEY_ONLY) or specified by context (for example, in message QueryResultBatch, field entity_result_type specifies a ResultType for all the values in field entity_results).

Properties:
Name Type Description
RESULT_TYPE_UNSPECIFIED number

Unspecified. This value is never used.

FULL number

The key and properties.

PROJECTION number

A projected subset of properties. The entity may have no key.

KEY_ONLY number

Only the key.

Source:

Type Definitions

AllocateIdsRequest

The request for Datastore.AllocateIds.

Properties:
Name Type Description
projectId string

Required. The ID of the project against which to make the request.

keys Array.<Object>

Required. A list of keys with incomplete key paths for which to allocate IDs. No key may be reserved/read-only.

This object should have the same structure as Key

Source:
See:

AllocateIdsResponse

The response for Datastore.AllocateIds.

Properties:
Name Type Description
keys Array.<Object>

The keys specified in the request (in the same order), each with its key path completed with a newly allocated ID.

This object should have the same structure as Key

Source:
See:

ArrayValue

An array value.

Properties:
Name Type Description
values Array.<Object>

Values in the array. The order of values in an array is preserved as long as all values have identical settings for 'exclude_from_indexes'.

This object should have the same structure as Value

Source:
See:

BeginTransactionRequest

The request for Datastore.BeginTransaction.

Properties:
Name Type Description
projectId string

Required. The ID of the project against which to make the request.

transactionOptions Object

Options for a new transaction.

This object should have the same structure as TransactionOptions

Source:
See:

BeginTransactionResponse

The response for Datastore.BeginTransaction.

Properties:
Name Type Description
transaction Buffer

The transaction identifier (always present).

Source:
See:

CommitRequest

The request for Datastore.Commit.

Properties:
Name Type Description
projectId string

Required. The ID of the project against which to make the request.

mode number

The type of commit to perform. Defaults to TRANSACTIONAL.

The number should be among the values of Mode

transaction Buffer

The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction.

mutations Array.<Object>

The mutations to perform.

When mode is TRANSACTIONAL, mutations affecting a single entity are applied in order. The following sequences of mutations affecting a single entity are not permitted in a single Commit request:

  • insert followed by insert
  • update followed by insert
  • upsert followed by insert
  • delete followed by update

When mode is NON_TRANSACTIONAL, no two mutations may affect a single entity.

This object should have the same structure as Mutation

Source:
See:

CommitResponse

The response for Datastore.Commit.

Properties:
Name Type Description
mutationResults Array.<Object>

The result of performing the mutations. The i-th mutation result corresponds to the i-th mutation in the request.

This object should have the same structure as MutationResult

indexUpdates number

The number of index entries updated during the commit, or zero if none were updated.

Source:
See:

CompositeFilter

A filter that merges multiple other filters using the given operator.

Properties:
Name Type Description
op number

The operator for combining multiple filters.

The number should be among the values of Operator

filters Array.<Object>

The list of filters to combine. Must contain at least one filter.

This object should have the same structure as Filter

Source:
See:

Entity

A Datastore data object.

An entity is limited to 1 megabyte when stored. That roughly corresponds to a limit of 1 megabyte for the serialized form of this message.

Properties:
Name Type Description
key Object

The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entity_value may have no key). An entity's kind is its key path's last element's kind, or null if it has no key.

This object should have the same structure as Key

properties Object.<string, Object>

The entity's properties. The map's keys are property names. A property name matching regex __.*__ is reserved. A reserved property name is forbidden in certain documented contexts. The name must not contain more than 500 characters. The name cannot be "".

Source:
See:

EntityResult

The result of fetching an entity from Datastore.

Properties:
Name Type Description
entity Object

The resulting entity.

This object should have the same structure as Entity

version number

The version of the entity, a strictly positive number that monotonically increases with changes to the entity.

This field is set for FULL entity results.

For missing entities in LookupResponse, this is the version of the snapshot that was used to look up the entity, and it is always set except for eventually consistent reads.

cursor Buffer

A cursor that points to the position after the result entity. Set only when the EntityResult is part of a QueryResultBatch message.

Source:
See:

Filter

A holder for any type of filter.

Properties:
Name Type Description
compositeFilter Object

A composite filter.

This object should have the same structure as CompositeFilter

propertyFilter Object

A filter on a property.

This object should have the same structure as PropertyFilter

Source:
See:

GqlQuery

Properties:
Name Type Description
queryString string

A string of the format described here.

allowLiterals boolean

When false, the query string must not contain any literals and instead must bind all values. For example, SELECT * FROM Kind WHERE a = 'string literal' is not allowed, while SELECT * FROM Kind WHERE a = @value is.

namedBindings Object.<string, Object>

For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse.

Key must match regex [A-Za-z_$][A-Za-z_$0-9]*, must not match regex __.*__, and must not be "".

positionalBindings Array.<Object>

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0.

For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

This object should have the same structure as GqlQueryParameter

Source:
See:

GqlQueryParameter

A binding parameter for a GQL query.

Properties:
Name Type Description
value Object

A value parameter.

This object should have the same structure as Value

cursor Buffer

A query cursor. Query cursors are returned in query result batches.

Source:
See:

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.

Properties:
Name Type Description
partitionId Object

Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition.

This object should have the same structure as PartitionId

path Array.<Object>

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 Mutation.insert may have no identifier.

A path can never be empty, and a path can have at most 100 elements.

This object should have the same structure as PathElement

Source:
See:

KindExpression

A representation of a kind.

Properties:
Name Type Description
name string

The name of the kind.

Source:
See:

LookupRequest

The request for Datastore.Lookup.

Properties:
Name Type Description
projectId string

Required. The ID of the project against which to make the request.

readOptions Object

The options for this lookup request.

This object should have the same structure as ReadOptions

keys Array.<Object>

Required. Keys of entities to look up.

This object should have the same structure as Key

Source:
See:

LookupResponse

The response for Datastore.Lookup.

Properties:
Name Type Description
found Array.<Object>

Entities found as ResultType.FULL entities. The order of results in this field is undefined and has no relation to the order of the keys in the input.

This object should have the same structure as EntityResult

missing Array.<Object>

Entities not found as ResultType.KEY_ONLY entities. The order of results in this field is undefined and has no relation to the order of the keys in the input.

This object should have the same structure as EntityResult

deferred Array.<Object>

A list of keys that were not looked up due to resource constraints. The order of results in this field is undefined and has no relation to the order of the keys in the input.

This object should have the same structure as Key

Source:
See:

Mutation

A mutation to apply to an entity.

Properties:
Name Type Description
insert Object

The entity to insert. The entity must not already exist. The entity key's final path element may be incomplete.

This object should have the same structure as Entity

update Object

The entity to update. The entity must already exist. Must have a complete key path.

This object should have the same structure as Entity

upsert Object

The entity to upsert. The entity may or may not already exist. The entity key's final path element may be incomplete.

This object should have the same structure as Entity

delete Object

The key of the entity to delete. The entity may or may not already exist. Must have a complete key path and must not be reserved/read-only.

This object should have the same structure as Key

baseVersion number

The version of the entity that this mutation is being applied to. If this does not match the current version on the server, the mutation conflicts.

Source:
See:

MutationResult

The result of applying a mutation.

Properties:
Name Type Description
key Object

The automatically allocated key. Set only when the mutation allocated a key.

This object should have the same structure as Key

version number

The version of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the version will be the version of the current entity or, if no entity is present, a version that is strictly greater than the version of any previous entity and less than the version of any possible future entity.

conflictDetected boolean

Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation.

Source:
See:

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.

Properties:
Name Type Description
projectId string

The ID of the project to which the entities belong.

namespaceId string

If not empty, the ID of the namespace to which the entities belong.

Source:
See:

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.

Properties:
Name Type Description
kind string

The kind of the entity. A kind matching regex __.*__ is reserved/read-only. A kind must not contain more than 1500 bytes when UTF-8 encoded. Cannot be "".

id number

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 string

The name of the entity. A name matching regex __.*__ is reserved/read-only. A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be "".

Source:
See:

Projection

A representation of a property in a projection.

Properties:
Name Type Description
property Object

The property to project.

This object should have the same structure as PropertyReference

Source:
See:

PropertyFilter

A filter on a specific property.

Properties:
Name Type Description
property Object

The property to filter by.

This object should have the same structure as PropertyReference

op number

The operator to filter by.

The number should be among the values of Operator

value Object

The value to compare the property to.

This object should have the same structure as Value

Source:
See:

PropertyOrder

The desired order for a specific property.

Properties:
Name Type Description
property Object

The property to order by.

This object should have the same structure as PropertyReference

direction number

The direction to order by. Defaults to ASCENDING.

The number should be among the values of Direction

Source:
See:

PropertyReference

A reference to a property relative to the kind expressions.

Properties:
Name Type Description
name string

The name of the property. If name includes "."s, it may be interpreted as a property name path.

Source:
See:

Query

A query for entities.

Properties:
Name Type Description
projection Array.<Object>

The projection to return. Defaults to returning all properties.

This object should have the same structure as Projection

kind Array.<Object>

The kinds to query (if empty, returns entities of all kinds). Currently at most 1 kind may be specified.

This object should have the same structure as KindExpression

filter Object

The filter to apply.

This object should have the same structure as Filter

order Array.<Object>

The order to apply to the query results (if empty, order is unspecified).

This object should have the same structure as PropertyOrder

distinctOn Array.<Object>

The properties to make distinct. The query results will contain the first result for each distinct combination of values for the given properties (if empty, all results are returned).

This object should have the same structure as PropertyReference

startCursor Buffer

A starting point for the query results. Query cursors are returned in query result batches and can only be used to continue the same query.

endCursor Buffer

An ending point for the query results. Query cursors are returned in query result batches and can only be used to limit the same query.

offset number

The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified.

limit Object

The maximum number of results to return. Applies after all other constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0 if specified.

This object should have the same structure as Int32Value

Source:
See:

QueryResultBatch

A batch of results produced by a query.

Properties:
Name Type Description
skippedResults number

The number of results skipped, typically because of an offset.

skippedCursor Buffer

A cursor that points to the position after the last skipped result. Will be set when skipped_results != 0.

entityResultType number

The result type for every entity in entity_results.

The number should be among the values of ResultType

entityResults Array.<Object>

The results for this batch.

This object should have the same structure as EntityResult

endCursor Buffer

A cursor that points to the position after the last result in the batch.

moreResults number

The state of the query after the current batch.

The number should be among the values of MoreResultsType

snapshotVersion number

The version number of the snapshot this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater snapshot version number. Each batch's snapshot version is valid for all preceding batches. The value will be zero for eventually consistent queries.

Source:
See:

ReadOnly

Options specific to read-only transactions.

Source:
See:

ReadOptions

The options shared by read requests.

Properties:
Name Type Description
readConsistency number

The non-transactional read consistency to use. Cannot be set to STRONG for global queries.

The number should be among the values of ReadConsistency

transaction Buffer

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction.

Source:
See:

ReadWrite

Options specific to read / write transactions.

Properties:
Name Type Description
previousTransaction Buffer

The transaction identifier of the transaction being retried.

Source:
See:

ReserveIdsRequest

The request for Datastore.ReserveIds.

Properties:
Name Type Description
projectId string

Required. The ID of the project against which to make the request.

databaseId string

If not empty, the ID of the database against which to make the request.

keys Array.<Object>

Required. A list of keys with complete key paths whose numeric IDs should not be auto-allocated.

This object should have the same structure as Key

Source:
See:

ReserveIdsResponse

The response for Datastore.ReserveIds.

Source:
See:

RollbackRequest

The request for Datastore.Rollback.

Properties:
Name Type Description
projectId string

Required. The ID of the project against which to make the request.

transaction Buffer

Required. The transaction identifier, returned by a call to Datastore.BeginTransaction.

Source:
See:

RollbackResponse

The response for Datastore.Rollback. (an empty message).

Source:
See:

RunQueryRequest

The request for Datastore.RunQuery.

Properties:
Name Type Description
projectId string

Required. The ID of the project against which to make the request.

partitionId Object

Entities are partitioned into subsets, identified by a partition ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID.

This object should have the same structure as PartitionId

readOptions Object

The options for this query.

This object should have the same structure as ReadOptions

query Object

The query to run.

This object should have the same structure as Query

gqlQuery Object

The GQL query to run.

This object should have the same structure as GqlQuery

Source:
See:

RunQueryResponse

The response for Datastore.RunQuery.

Properties:
Name Type Description
batch Object

A batch of query results (always present).

This object should have the same structure as QueryResultBatch

query Object

The parsed form of the GqlQuery from the request, if it was set.

This object should have the same structure as Query

Source:
See:

TransactionOptions

Options for beginning a new transaction.

Transactions can be created explicitly with calls to Datastore.BeginTransaction or implicitly by setting ReadOptions.new_transaction in read requests.

Properties:
Name Type Description
readWrite Object

The transaction should allow both reads and writes.

This object should have the same structure as ReadWrite

readOnly Object

The transaction should only allow reads.

This object should have the same structure as ReadOnly

Source:
See:

Value

A message that can hold any of the supported value types and associated metadata.

Properties:
Name Type Description
nullValue number

A null value.

The number should be among the values of NullValue

booleanValue boolean

A boolean value.

integerValue number

An integer value.

doubleValue number

A double value.

timestampValue Object

A timestamp value. When stored in the Datastore, precise only to microseconds; any additional precision is rounded down.

This object should have the same structure as Timestamp

keyValue Object

A key value.

This object should have the same structure as Key

stringValue string

A UTF-8 encoded string value. When exclude_from_indexes is false (it is indexed) , may have at most 1500 bytes. Otherwise, may be set to at least 1,000,000 bytes.

blobValue Buffer

A blob value. May have at most 1,000,000 bytes. When exclude_from_indexes is false, may have at most 1500 bytes. In JSON requests, must be base64-encoded.

geoPointValue Object

A geo point value representing a point on the surface of Earth.

This object should have the same structure as LatLng

entityValue Object

An entity value.

  • May have no key.
  • May have a key with an incomplete key path.
  • May have a reserved/read-only key.

This object should have the same structure as Entity

arrayValue Object

An array value. Cannot contain another array value. A Value instance that sets field array_value must not set fields meaning or exclude_from_indexes.

This object should have the same structure as ArrayValue

meaning number

The meaning field should only be populated for backwards compatibility.

excludeFromIndexes boolean

If the value should be excluded from all indexes including those defined explicitly.

Source:
See: