Constants
Datastore_Lookup_FullMethodName, Datastore_RunQuery_FullMethodName, Datastore_RunAggregationQuery_FullMethodName, Datastore_BeginTransaction_FullMethodName, Datastore_Commit_FullMethodName, Datastore_Rollback_FullMethodName, Datastore_AllocateIds_FullMethodName, Datastore_ReserveIds_FullMethodName
const (
Datastore_Lookup_FullMethodName = "/google.datastore.v1.Datastore/Lookup"
Datastore_RunQuery_FullMethodName = "/google.datastore.v1.Datastore/RunQuery"
Datastore_RunAggregationQuery_FullMethodName = "/google.datastore.v1.Datastore/RunAggregationQuery"
Datastore_BeginTransaction_FullMethodName = "/google.datastore.v1.Datastore/BeginTransaction"
Datastore_Commit_FullMethodName = "/google.datastore.v1.Datastore/Commit"
Datastore_Rollback_FullMethodName = "/google.datastore.v1.Datastore/Rollback"
Datastore_AllocateIds_FullMethodName = "/google.datastore.v1.Datastore/AllocateIds"
Datastore_ReserveIds_FullMethodName = "/google.datastore.v1.Datastore/ReserveIds"
)Variables
CommitRequest_Mode_name, CommitRequest_Mode_value
var (
CommitRequest_Mode_name = map[int32]string{
0: "MODE_UNSPECIFIED",
1: "TRANSACTIONAL",
2: "NON_TRANSACTIONAL",
}
CommitRequest_Mode_value = map[string]int32{
"MODE_UNSPECIFIED": 0,
"TRANSACTIONAL": 1,
"NON_TRANSACTIONAL": 2,
}
)Enum value maps for CommitRequest_Mode.
Mutation_ConflictResolutionStrategy_name, Mutation_ConflictResolutionStrategy_value
var (
Mutation_ConflictResolutionStrategy_name = map[int32]string{
0: "STRATEGY_UNSPECIFIED",
1: "SERVER_VALUE",
3: "FAIL",
}
Mutation_ConflictResolutionStrategy_value = map[string]int32{
"STRATEGY_UNSPECIFIED": 0,
"SERVER_VALUE": 1,
"FAIL": 3,
}
)Enum value maps for Mutation_ConflictResolutionStrategy.
PropertyTransform_ServerValue_name, PropertyTransform_ServerValue_value
var (
PropertyTransform_ServerValue_name = map[int32]string{
0: "SERVER_VALUE_UNSPECIFIED",
1: "REQUEST_TIME",
}
PropertyTransform_ServerValue_value = map[string]int32{
"SERVER_VALUE_UNSPECIFIED": 0,
"REQUEST_TIME": 1,
}
)Enum value maps for PropertyTransform_ServerValue.
ReadOptions_ReadConsistency_name, ReadOptions_ReadConsistency_value
var (
ReadOptions_ReadConsistency_name = map[int32]string{
0: "READ_CONSISTENCY_UNSPECIFIED",
1: "STRONG",
2: "EVENTUAL",
}
ReadOptions_ReadConsistency_value = map[string]int32{
"READ_CONSISTENCY_UNSPECIFIED": 0,
"STRONG": 1,
"EVENTUAL": 2,
}
)Enum value maps for ReadOptions_ReadConsistency.
EntityResult_ResultType_name, EntityResult_ResultType_value
var (
EntityResult_ResultType_name = map[int32]string{
0: "RESULT_TYPE_UNSPECIFIED",
1: "FULL",
2: "PROJECTION",
3: "KEY_ONLY",
}
EntityResult_ResultType_value = map[string]int32{
"RESULT_TYPE_UNSPECIFIED": 0,
"FULL": 1,
"PROJECTION": 2,
"KEY_ONLY": 3,
}
)Enum value maps for EntityResult_ResultType.
PropertyOrder_Direction_name, PropertyOrder_Direction_value
var (
PropertyOrder_Direction_name = map[int32]string{
0: "DIRECTION_UNSPECIFIED",
1: "ASCENDING",
2: "DESCENDING",
}
PropertyOrder_Direction_value = map[string]int32{
"DIRECTION_UNSPECIFIED": 0,
"ASCENDING": 1,
"DESCENDING": 2,
}
)Enum value maps for PropertyOrder_Direction.
CompositeFilter_Operator_name, CompositeFilter_Operator_value
var (
CompositeFilter_Operator_name = map[int32]string{
0: "OPERATOR_UNSPECIFIED",
1: "AND",
2: "OR",
}
CompositeFilter_Operator_value = map[string]int32{
"OPERATOR_UNSPECIFIED": 0,
"AND": 1,
"OR": 2,
}
)Enum value maps for CompositeFilter_Operator.
PropertyFilter_Operator_name, PropertyFilter_Operator_value
var (
PropertyFilter_Operator_name = map[int32]string{
0: "OPERATOR_UNSPECIFIED",
1: "LESS_THAN",
2: "LESS_THAN_OR_EQUAL",
3: "GREATER_THAN",
4: "GREATER_THAN_OR_EQUAL",
5: "EQUAL",
6: "IN",
9: "NOT_EQUAL",
11: "HAS_ANCESTOR",
13: "NOT_IN",
}
PropertyFilter_Operator_value = map[string]int32{
"OPERATOR_UNSPECIFIED": 0,
"LESS_THAN": 1,
"LESS_THAN_OR_EQUAL": 2,
"GREATER_THAN": 3,
"GREATER_THAN_OR_EQUAL": 4,
"EQUAL": 5,
"IN": 6,
"NOT_EQUAL": 9,
"HAS_ANCESTOR": 11,
"NOT_IN": 13,
}
)Enum value maps for PropertyFilter_Operator.
FindNearest_DistanceMeasure_name, FindNearest_DistanceMeasure_value
var (
FindNearest_DistanceMeasure_name = map[int32]string{
0: "DISTANCE_MEASURE_UNSPECIFIED",
1: "EUCLIDEAN",
2: "COSINE",
3: "DOT_PRODUCT",
}
FindNearest_DistanceMeasure_value = map[string]int32{
"DISTANCE_MEASURE_UNSPECIFIED": 0,
"EUCLIDEAN": 1,
"COSINE": 2,
"DOT_PRODUCT": 3,
}
)Enum value maps for FindNearest_DistanceMeasure.
QueryResultBatch_MoreResultsType_name, QueryResultBatch_MoreResultsType_value
var (
QueryResultBatch_MoreResultsType_name = map[int32]string{
0: "MORE_RESULTS_TYPE_UNSPECIFIED",
1: "NOT_FINISHED",
2: "MORE_RESULTS_AFTER_LIMIT",
4: "MORE_RESULTS_AFTER_CURSOR",
3: "NO_MORE_RESULTS",
}
QueryResultBatch_MoreResultsType_value = map[string]int32{
"MORE_RESULTS_TYPE_UNSPECIFIED": 0,
"NOT_FINISHED": 1,
"MORE_RESULTS_AFTER_LIMIT": 2,
"MORE_RESULTS_AFTER_CURSOR": 4,
"NO_MORE_RESULTS": 3,
}
)Enum value maps for QueryResultBatch_MoreResultsType.
Datastore_ServiceDesc
var Datastore_ServiceDesc = grpc.ServiceDesc{
ServiceName: "google.datastore.v1.Datastore",
HandlerType: (*DatastoreServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Lookup",
Handler: _Datastore_Lookup_Handler,
},
{
MethodName: "RunQuery",
Handler: _Datastore_RunQuery_Handler,
},
{
MethodName: "RunAggregationQuery",
Handler: _Datastore_RunAggregationQuery_Handler,
},
{
MethodName: "BeginTransaction",
Handler: _Datastore_BeginTransaction_Handler,
},
{
MethodName: "Commit",
Handler: _Datastore_Commit_Handler,
},
{
MethodName: "Rollback",
Handler: _Datastore_Rollback_Handler,
},
{
MethodName: "AllocateIds",
Handler: _Datastore_AllocateIds_Handler,
},
{
MethodName: "ReserveIds",
Handler: _Datastore_ReserveIds_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/datastore/v1/datastore.proto",
}Datastore_ServiceDesc is the grpc.ServiceDesc for Datastore service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
File_google_datastore_v1_aggregation_result_proto
var File_google_datastore_v1_aggregation_result_proto protoreflect.FileDescriptorFile_google_datastore_v1_datastore_proto
var File_google_datastore_v1_datastore_proto protoreflect.FileDescriptorFile_google_datastore_v1_entity_proto
var File_google_datastore_v1_entity_proto protoreflect.FileDescriptorFile_google_datastore_v1_query_profile_proto
var File_google_datastore_v1_query_profile_proto protoreflect.FileDescriptorFile_google_datastore_v1_query_proto
var File_google_datastore_v1_query_proto protoreflect.FileDescriptorFunctions
func RegisterDatastoreServer
func RegisterDatastoreServer(s grpc.ServiceRegistrar, srv DatastoreServer)AggregationQuery
type AggregationQuery struct {
// The base query to aggregate over.
//
// Types that are assignable to QueryType:
//
// *AggregationQuery_NestedQuery
QueryType isAggregationQuery_QueryType `protobuf_oneof:"query_type"`
// Optional. Series of aggregations to apply over the results of the
// `nested_query`.
//
// Requires:
//
// * A minimum of one and maximum of five aggregations per query.
Aggregations []*AggregationQuery_Aggregation `protobuf:"bytes,3,rep,name=aggregations,proto3" json:"aggregations,omitempty"`
// contains filtered or unexported fields
}Datastore query for running an aggregation over a [Query][google.datastore.v1.Query].
func (*AggregationQuery) Descriptor
func (*AggregationQuery) Descriptor() ([]byte, []int)Deprecated: Use AggregationQuery.ProtoReflect.Descriptor instead.
func (*AggregationQuery) GetAggregations
func (x *AggregationQuery) GetAggregations() []*AggregationQuery_Aggregationfunc (*AggregationQuery) GetNestedQuery
func (x *AggregationQuery) GetNestedQuery() *Queryfunc (*AggregationQuery) GetQueryType
func (m *AggregationQuery) GetQueryType() isAggregationQuery_QueryTypefunc (*AggregationQuery) ProtoMessage
func (*AggregationQuery) ProtoMessage()func (*AggregationQuery) ProtoReflect
func (x *AggregationQuery) ProtoReflect() protoreflect.Messagefunc (*AggregationQuery) Reset
func (x *AggregationQuery) Reset()func (*AggregationQuery) String
func (x *AggregationQuery) String() stringAggregationQuery_Aggregation
type AggregationQuery_Aggregation struct {
// The type of aggregation to perform, required.
//
// Types that are assignable to Operator:
//
// *AggregationQuery_Aggregation_Count_
// *AggregationQuery_Aggregation_Sum_
// *AggregationQuery_Aggregation_Avg_
Operator isAggregationQuery_Aggregation_Operator `protobuf_oneof:"operator"`
// Optional. Optional name of the property to store the result of the
// aggregation.
//
// If not provided, Datastore will pick a default name following the format
// `property_Defines an aggregation that produces a single result.
func (*AggregationQuery_Aggregation) Descriptor
func (*AggregationQuery_Aggregation) Descriptor() ([]byte, []int)Deprecated: Use AggregationQuery_Aggregation.ProtoReflect.Descriptor instead.
func (*AggregationQuery_Aggregation) GetAlias
func (x *AggregationQuery_Aggregation) GetAlias() stringfunc (*AggregationQuery_Aggregation) GetAvg
func (x *AggregationQuery_Aggregation) GetAvg() *AggregationQuery_Aggregation_Avgfunc (*AggregationQuery_Aggregation) GetCount
func (x *AggregationQuery_Aggregation) GetCount() *AggregationQuery_Aggregation_Countfunc (*AggregationQuery_Aggregation) GetOperator
func (m *AggregationQuery_Aggregation) GetOperator() isAggregationQuery_Aggregation_Operatorfunc (*AggregationQuery_Aggregation) GetSum
func (x *AggregationQuery_Aggregation) GetSum() *AggregationQuery_Aggregation_Sumfunc (*AggregationQuery_Aggregation) ProtoMessage
func (*AggregationQuery_Aggregation) ProtoMessage()func (*AggregationQuery_Aggregation) ProtoReflect
func (x *AggregationQuery_Aggregation) ProtoReflect() protoreflect.Messagefunc (*AggregationQuery_Aggregation) Reset
func (x *AggregationQuery_Aggregation) Reset()func (*AggregationQuery_Aggregation) String
func (x *AggregationQuery_Aggregation) String() stringAggregationQuery_Aggregation_Avg
type AggregationQuery_Aggregation_Avg struct {
// The property to aggregate on.
Property *PropertyReference `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
// contains filtered or unexported fields
}Average of the values of the requested property.
Only numeric values will be aggregated. All non-numeric values including
NULLare skipped.If the aggregated values contain
NaN, returnsNaN. Infinity math follows IEEE-754 standards.If the aggregated value set is empty, returns
NULL.Always returns the result as a double.
func (*AggregationQuery_Aggregation_Avg) Descriptor
func (*AggregationQuery_Aggregation_Avg) Descriptor() ([]byte, []int)Deprecated: Use AggregationQuery_Aggregation_Avg.ProtoReflect.Descriptor instead.
func (*AggregationQuery_Aggregation_Avg) GetProperty
func (x *AggregationQuery_Aggregation_Avg) GetProperty() *PropertyReferencefunc (*AggregationQuery_Aggregation_Avg) ProtoMessage
func (*AggregationQuery_Aggregation_Avg) ProtoMessage()func (*AggregationQuery_Aggregation_Avg) ProtoReflect
func (x *AggregationQuery_Aggregation_Avg) ProtoReflect() protoreflect.Messagefunc (*AggregationQuery_Aggregation_Avg) Reset
func (x *AggregationQuery_Aggregation_Avg) Reset()func (*AggregationQuery_Aggregation_Avg) String
func (x *AggregationQuery_Aggregation_Avg) String() stringAggregationQuery_Aggregation_Avg_
type AggregationQuery_Aggregation_Avg_ struct {
// Average aggregator.
Avg *AggregationQuery_Aggregation_Avg `protobuf:"bytes,3,opt,name=avg,proto3,oneof"`
}AggregationQuery_Aggregation_Count
type AggregationQuery_Aggregation_Count struct {
// Optional. Optional constraint on the maximum number of entities to
// count.
//
// This provides a way to set an upper bound on the number of entities
// to scan, limiting latency, and cost.
//
// Unspecified is interpreted as no bound.
//
// If a zero value is provided, a count result of zero should always be
// expected.
//
// High-Level Example:
//
// ```
// AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k );
// ```
//
// Requires:
//
// * Must be non-negative when present.
UpTo *wrapperspb.Int64Value `protobuf:"bytes,1,opt,name=up_to,json=upTo,proto3" json:"up_to,omitempty"`
// contains filtered or unexported fields
}Count of entities that match the query.
The COUNT(*) aggregation function operates on the entire entity
so it does not require a field reference.
func (*AggregationQuery_Aggregation_Count) Descriptor
func (*AggregationQuery_Aggregation_Count) Descriptor() ([]byte, []int)Deprecated: Use AggregationQuery_Aggregation_Count.ProtoReflect.Descriptor instead.
func (*AggregationQuery_Aggregation_Count) GetUpTo
func (x *AggregationQuery_Aggregation_Count) GetUpTo() *wrapperspb.Int64Valuefunc (*AggregationQuery_Aggregation_Count) ProtoMessage
func (*AggregationQuery_Aggregation_Count) ProtoMessage()func (*AggregationQuery_Aggregation_Count) ProtoReflect
func (x *AggregationQuery_Aggregation_Count) ProtoReflect() protoreflect.Messagefunc (*AggregationQuery_Aggregation_Count) Reset
func (x *AggregationQuery_Aggregation_Count) Reset()func (*AggregationQuery_Aggregation_Count) String
func (x *AggregationQuery_Aggregation_Count) String() stringAggregationQuery_Aggregation_Count_
type AggregationQuery_Aggregation_Count_ struct {
// Count aggregator.
Count *AggregationQuery_Aggregation_Count `protobuf:"bytes,1,opt,name=count,proto3,oneof"`
}AggregationQuery_Aggregation_Sum
type AggregationQuery_Aggregation_Sum struct {
// The property to aggregate on.
Property *PropertyReference `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
// contains filtered or unexported fields
}Sum of the values of the requested property.
Only numeric values will be aggregated. All non-numeric values including
NULLare skipped.If the aggregated values contain
NaN, returnsNaN. Infinity math follows IEEE-754 standards.If the aggregated value set is empty, returns 0.
Returns a 64-bit integer if all aggregated numbers are integers and the sum result does not overflow. Otherwise, the result is returned as a double. Note that even if all the aggregated values are integers, the result is returned as a double if it cannot fit within a 64-bit signed integer. When this occurs, the returned value will lose precision.
When underflow occurs, floating-point aggregation is non-deterministic. This means that running the same query repeatedly without any changes to the underlying values could produce slightly different results each time. In those cases, values should be stored as integers over floating-point numbers.
func (*AggregationQuery_Aggregation_Sum) Descriptor
func (*AggregationQuery_Aggregation_Sum) Descriptor() ([]byte, []int)Deprecated: Use AggregationQuery_Aggregation_Sum.ProtoReflect.Descriptor instead.
func (*AggregationQuery_Aggregation_Sum) GetProperty
func (x *AggregationQuery_Aggregation_Sum) GetProperty() *PropertyReferencefunc (*AggregationQuery_Aggregation_Sum) ProtoMessage
func (*AggregationQuery_Aggregation_Sum) ProtoMessage()func (*AggregationQuery_Aggregation_Sum) ProtoReflect
func (x *AggregationQuery_Aggregation_Sum) ProtoReflect() protoreflect.Messagefunc (*AggregationQuery_Aggregation_Sum) Reset
func (x *AggregationQuery_Aggregation_Sum) Reset()func (*AggregationQuery_Aggregation_Sum) String
func (x *AggregationQuery_Aggregation_Sum) String() stringAggregationQuery_Aggregation_Sum_
type AggregationQuery_Aggregation_Sum_ struct {
// Sum aggregator.
Sum *AggregationQuery_Aggregation_Sum `protobuf:"bytes,2,opt,name=sum,proto3,oneof"`
}AggregationQuery_NestedQuery
type AggregationQuery_NestedQuery struct {
// Nested query for aggregation
NestedQuery *Query `protobuf:"bytes,1,opt,name=nested_query,json=nestedQuery,proto3,oneof"`
}AggregationResult
type AggregationResult struct {
// The result of the aggregation functions, ex: `COUNT(*) AS total_entities`.
//
// The key is the
// [alias][google.datastore.v1.AggregationQuery.Aggregation.alias] assigned to
// the aggregation function on input and the size of this map equals the
// number of aggregation functions in the query.
AggregateProperties map[string]*Value `protobuf:"bytes,2,rep,name=aggregate_properties,json=aggregateProperties,proto3" json:"aggregate_properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// contains filtered or unexported fields
}The result of a single bucket from a Datastore aggregation query.
The keys of aggregate_properties are the same for all results in an
aggregation query, unlike entity queries which can have different fields
present for each result.
func (*AggregationResult) Descriptor
func (*AggregationResult) Descriptor() ([]byte, []int)Deprecated: Use AggregationResult.ProtoReflect.Descriptor instead.
func (*AggregationResult) GetAggregateProperties
func (x *AggregationResult) GetAggregateProperties() map[string]*Valuefunc (*AggregationResult) ProtoMessage
func (*AggregationResult) ProtoMessage()func (*AggregationResult) ProtoReflect
func (x *AggregationResult) ProtoReflect() protoreflect.Messagefunc (*AggregationResult) Reset
func (x *AggregationResult) Reset()func (*AggregationResult) String
func (x *AggregationResult) String() stringAggregationResultBatch
type AggregationResultBatch struct {
// The aggregation results for this batch.
AggregationResults []*AggregationResult `protobuf:"bytes,1,rep,name=aggregation_results,json=aggregationResults,proto3" json:"aggregation_results,omitempty"`
// The state of the query after the current batch.
// Only COUNT(*) aggregations are supported in the initial launch. Therefore,
// expected result type is limited to `NO_MORE_RESULTS`.
MoreResults QueryResultBatch_MoreResultsType `protobuf:"varint,2,opt,name=more_results,json=moreResults,proto3,enum=google.datastore.v1.QueryResultBatch_MoreResultsType" json:"more_results,omitempty"`
// Read timestamp this batch was returned from.
//
// In a single transaction, subsequent query result batches for the same query
// can have a greater timestamp. Each batch's read timestamp
// is valid for all preceding batches.
ReadTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
// contains filtered or unexported fields
}A batch of aggregation results produced by an aggregation query.
func (*AggregationResultBatch) Descriptor
func (*AggregationResultBatch) Descriptor() ([]byte, []int)Deprecated: Use AggregationResultBatch.ProtoReflect.Descriptor instead.
func (*AggregationResultBatch) GetAggregationResults
func (x *AggregationResultBatch) GetAggregationResults() []*AggregationResultfunc (*AggregationResultBatch) GetMoreResults
func (x *AggregationResultBatch) GetMoreResults() QueryResultBatch_MoreResultsTypefunc (*AggregationResultBatch) GetReadTime
func (x *AggregationResultBatch) GetReadTime() *timestamppb.Timestampfunc (*AggregationResultBatch) ProtoMessage
func (*AggregationResultBatch) ProtoMessage()func (*AggregationResultBatch) ProtoReflect
func (x *AggregationResultBatch) ProtoReflect() protoreflect.Messagefunc (*AggregationResultBatch) Reset
func (x *AggregationResultBatch) Reset()func (*AggregationResultBatch) String
func (x *AggregationResultBatch) String() stringAllocateIdsRequest
type AllocateIdsRequest struct {
// Required. The ID of the project against which to make the request.
ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string ” to refer the default
// database.
DatabaseId string `protobuf:"bytes,9,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"`
// Required. A list of keys with incomplete key paths for which to allocate
// IDs. No key may be reserved/read-only.
Keys []*Key `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
// contains filtered or unexported fields
}The request for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
func (*AllocateIdsRequest) Descriptor
func (*AllocateIdsRequest) Descriptor() ([]byte, []int)Deprecated: Use AllocateIdsRequest.ProtoReflect.Descriptor instead.
func (*AllocateIdsRequest) GetDatabaseId
func (x *AllocateIdsRequest) GetDatabaseId() stringfunc (*AllocateIdsRequest) GetKeys
func (x *AllocateIdsRequest) GetKeys() []*Keyfunc (*AllocateIdsRequest) GetProjectId
func (x *AllocateIdsRequest) GetProjectId() stringfunc (*AllocateIdsRequest) ProtoMessage
func (*AllocateIdsRequest) ProtoMessage()func (*AllocateIdsRequest) ProtoReflect
func (x *AllocateIdsRequest) ProtoReflect() protoreflect.Messagefunc (*AllocateIdsRequest) Reset
func (x *AllocateIdsRequest) Reset()func (*AllocateIdsRequest) String
func (x *AllocateIdsRequest) String() stringAllocateIdsResponse
type AllocateIdsResponse struct {
// The keys specified in the request (in the same order), each with
// its key path completed with a newly allocated ID.
Keys []*Key `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
// contains filtered or unexported fields
}The response for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
func (*AllocateIdsResponse) Descriptor
func (*AllocateIdsResponse) Descriptor() ([]byte, []int)Deprecated: Use AllocateIdsResponse.ProtoReflect.Descriptor instead.
func (*AllocateIdsResponse) GetKeys
func (x *AllocateIdsResponse) GetKeys() []*Keyfunc (*AllocateIdsResponse) ProtoMessage
func (*AllocateIdsResponse) ProtoMessage()func (*AllocateIdsResponse) ProtoReflect
func (x *AllocateIdsResponse) ProtoReflect() protoreflect.Messagefunc (*AllocateIdsResponse) Reset
func (x *AllocateIdsResponse) Reset()func (*AllocateIdsResponse) String
func (x *AllocateIdsResponse) String() stringArrayValue
type ArrayValue struct {
// 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'.
Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}An array value.
func (*ArrayValue) Descriptor
func (*ArrayValue) Descriptor() ([]byte, []int)Deprecated: Use ArrayValue.ProtoReflect.Descriptor instead.
func (*ArrayValue) GetValues
func (x *ArrayValue) GetValues() []*Valuefunc (*ArrayValue) ProtoMessage
func (*ArrayValue) ProtoMessage()func (*ArrayValue) ProtoReflect
func (x *ArrayValue) ProtoReflect() protoreflect.Messagefunc (*ArrayValue) Reset
func (x *ArrayValue) Reset()func (*ArrayValue) String
func (x *ArrayValue) String() stringBeginTransactionRequest
type BeginTransactionRequest struct {
// Required. The ID of the project against which to make the request.
ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string ” to refer the default
// database.
DatabaseId string `protobuf:"bytes,9,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"`
// Options for a new transaction.
TransactionOptions *TransactionOptions `protobuf:"bytes,10,opt,name=transaction_options,json=transactionOptions,proto3" json:"transaction_options,omitempty"`
// contains filtered or unexported fields
}The request for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
func (*BeginTransactionRequest) Descriptor
func (*BeginTransactionRequest) Descriptor() ([]byte, []int)Deprecated: Use BeginTransactionRequest.ProtoReflect.Descriptor instead.
func (*BeginTransactionRequest) GetDatabaseId
func (x *BeginTransactionRequest) GetDatabaseId() stringfunc (*BeginTransactionRequest) GetProjectId
func (x *BeginTransactionRequest) GetProjectId() stringfunc (*BeginTransactionRequest) GetTransactionOptions
func (x *BeginTransactionRequest) GetTransactionOptions() *TransactionOptionsfunc (*BeginTransactionRequest) ProtoMessage
func (*BeginTransactionRequest) ProtoMessage()func (*BeginTransactionRequest) ProtoReflect
func (x *BeginTransactionRequest) ProtoReflect() protoreflect.Messagefunc (*BeginTransactionRequest) Reset
func (x *BeginTransactionRequest) Reset()func (*BeginTransactionRequest) String
func (x *BeginTransactionRequest) String() stringBeginTransactionResponse
type BeginTransactionResponse struct {
// The transaction identifier (always present).
Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
// contains filtered or unexported fields
}The response for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
func (*BeginTransactionResponse) Descriptor
func (*BeginTransactionResponse) Descriptor() ([]byte, []int)Deprecated: Use BeginTransactionResponse.ProtoReflect.Descriptor instead.
func (*BeginTransactionResponse) GetTransaction
func (x *BeginTransactionResponse) GetTransaction() []bytefunc (*BeginTransactionResponse) ProtoMessage
func (*BeginTransactionResponse) ProtoMessage()func (*BeginTransactionResponse) ProtoReflect
func (x *BeginTransactionResponse) ProtoReflect() protoreflect.Messagefunc (*BeginTransactionResponse) Reset
func (x *BeginTransactionResponse) Reset()func (*BeginTransactionResponse) String
func (x *BeginTransactionResponse) String() stringCommitRequest
type CommitRequest struct {
// Required. The ID of the project against which to make the request.
ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string ” to refer the default
// database.
DatabaseId string `protobuf:"bytes,9,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"`
// The type of commit to perform. Defaults to `TRANSACTIONAL`.
Mode CommitRequest_Mode `protobuf:"varint,5,opt,name=mode,proto3,enum=google.datastore.v1.CommitRequest_Mode" json:"mode,omitempty"`
// Must be set when mode is `TRANSACTIONAL`.
//
// Types that are assignable to TransactionSelector:
//
// *CommitRequest_Transaction
// *CommitRequest_SingleUseTransaction
TransactionSelector isCommitRequest_TransactionSelector `protobuf_oneof:"transaction_selector"`
// 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.
Mutations []*Mutation `protobuf:"bytes,6,rep,name=mutations,proto3" json:"mutations,omitempty"`
// contains filtered or unexported fields
}The request for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
func (*CommitRequest) Descriptor
func (*CommitRequest) Descriptor() ([]byte, []int)Deprecated: Use CommitRequest.ProtoReflect.Descriptor instead.
func (*CommitRequest) GetDatabaseId
func (x *CommitRequest) GetDatabaseId() stringfunc (*CommitRequest) GetMode
func (x *CommitRequest) GetMode() CommitRequest_Modefunc (*CommitRequest) GetMutations
func (x *CommitRequest) GetMutations() []*Mutationfunc (*CommitRequest) GetProjectId
func (x *CommitRequest) GetProjectId() stringfunc (*CommitRequest) GetSingleUseTransaction
func (x *CommitRequest) GetSingleUseTransaction() *TransactionOptionsfunc (*CommitRequest) GetTransaction
func (x *CommitRequest) GetTransaction() []bytefunc (*CommitRequest) GetTransactionSelector
func (m *CommitRequest) GetTransactionSelector() isCommitRequest_TransactionSelectorfunc (*CommitRequest) ProtoMessage
func (*CommitRequest) ProtoMessage()func (*CommitRequest) ProtoReflect
func (x *CommitRequest) ProtoReflect() protoreflect.Messagefunc (*CommitRequest) Reset
func (x *CommitRequest) Reset()func (*CommitRequest) String
func (x *CommitRequest) String() stringCommitRequest_Mode
type CommitRequest_Mode int32The modes available for commits.
CommitRequest_MODE_UNSPECIFIED, CommitRequest_TRANSACTIONAL, CommitRequest_NON_TRANSACTIONAL
const (
// Unspecified. This value must not be used.
CommitRequest_MODE_UNSPECIFIED CommitRequest_Mode = 0
// Transactional: The mutations are either all applied, or none are applied.
// Learn about transactions
// [here](https://cloud.google.com/datastore/docs/concepts/transactions).
CommitRequest_TRANSACTIONAL CommitRequest_Mode = 1
// Non-transactional: The mutations may not apply as all or none.
CommitRequest_NON_TRANSACTIONAL CommitRequest_Mode = 2
)func (CommitRequest_Mode) Descriptor
func (CommitRequest_Mode) Descriptor() protoreflect.EnumDescriptorfunc (CommitRequest_Mode) Enum
func (x CommitRequest_Mode) Enum() *CommitRequest_Modefunc (CommitRequest_Mode) EnumDescriptor
func (CommitRequest_Mode) EnumDescriptor() ([]byte, []int)Deprecated: Use CommitRequest_Mode.Descriptor instead.
func (CommitRequest_Mode) Number
func (x CommitRequest_Mode) Number() protoreflect.EnumNumberfunc (CommitRequest_Mode) String
func (x CommitRequest_Mode) String() stringfunc (CommitRequest_Mode) Type
func (CommitRequest_Mode) Type() protoreflect.EnumTypeCommitRequest_SingleUseTransaction
type CommitRequest_SingleUseTransaction struct {
// Options for beginning a new transaction for this request.
// The transaction is committed when the request completes. If specified,
// [TransactionOptions.mode][google.datastore.v1.TransactionOptions] must be
// [TransactionOptions.ReadWrite][google.datastore.v1.TransactionOptions.ReadWrite].
SingleUseTransaction *TransactionOptions `protobuf:"bytes,10,opt,name=single_use_transaction,json=singleUseTransaction,proto3,oneof"`
}CommitRequest_Transaction
type CommitRequest_Transaction struct {
// The identifier of the transaction associated with the commit. A
// transaction identifier is returned by a call to
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3,oneof"`
}CommitResponse
type CommitResponse struct {
// The result of performing the mutations.
// The i-th mutation result corresponds to the i-th mutation in the request.
MutationResults []*MutationResult `protobuf:"bytes,3,rep,name=mutation_results,json=mutationResults,proto3" json:"mutation_results,omitempty"`
// The number of index entries updated during the commit, or zero if none were
// updated.
IndexUpdates int32 `protobuf:"varint,4,opt,name=index_updates,json=indexUpdates,proto3" json:"index_updates,omitempty"`
// The transaction commit timestamp. Not set for non-transactional commits.
CommitTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=commit_time,json=commitTime,proto3" json:"commit_time,omitempty"`
// contains filtered or unexported fields
}The response for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
func (*CommitResponse) Descriptor
func (*CommitResponse) Descriptor() ([]byte, []int)Deprecated: Use CommitResponse.ProtoReflect.Descriptor instead.
func (*CommitResponse) GetCommitTime
func (x *CommitResponse) GetCommitTime() *timestamppb.Timestampfunc (*CommitResponse) GetIndexUpdates
func (x *CommitResponse) GetIndexUpdates() int32func (*CommitResponse) GetMutationResults
func (x *CommitResponse) GetMutationResults() []*MutationResultfunc (*CommitResponse) ProtoMessage
func (*CommitResponse) ProtoMessage()func (*CommitResponse) ProtoReflect
func (x *CommitResponse) ProtoReflect() protoreflect.Messagefunc (*CommitResponse) Reset
func (x *CommitResponse) Reset()func (*CommitResponse) String
func (x *CommitResponse) String() stringCompositeFilter
type CompositeFilter struct {
// The operator for combining multiple filters.
Op CompositeFilter_Operator `protobuf:"varint,1,opt,name=op,proto3,enum=google.datastore.v1.CompositeFilter_Operator" json:"op,omitempty"`
// The list of filters to combine.
//
// Requires:
//
// * At least one filter is present.
Filters []*Filter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"`
// contains filtered or unexported fields
}A filter that merges multiple other filters using the given operator.
func (*CompositeFilter) Descriptor
func (*CompositeFilter) Descriptor() ([]byte, []int)Deprecated: Use CompositeFilter.ProtoReflect.Descriptor instead.
func (*CompositeFilter) GetFilters
func (x *CompositeFilter) GetFilters() []*Filterfunc (*CompositeFilter) GetOp
func (x *CompositeFilter) GetOp() CompositeFilter_Operatorfunc (*CompositeFilter) ProtoMessage
func (*CompositeFilter) ProtoMessage()func (*CompositeFilter) ProtoReflect
func (x *CompositeFilter) ProtoReflect() protoreflect.Messagefunc (*CompositeFilter) Reset
func (x *CompositeFilter) Reset()func (*CompositeFilter) String
func (x *CompositeFilter) String() stringCompositeFilter_Operator
type CompositeFilter_Operator int32A composite filter operator.
CompositeFilter_OPERATOR_UNSPECIFIED, CompositeFilter_AND, CompositeFilter_OR
const (
// Unspecified. This value must not be used.
CompositeFilter_OPERATOR_UNSPECIFIED CompositeFilter_Operator = 0
// The results are required to satisfy each of the combined filters.
CompositeFilter_AND CompositeFilter_Operator = 1
// Documents are required to satisfy at least one of the combined filters.
CompositeFilter_OR CompositeFilter_Operator = 2
)func (CompositeFilter_Operator) Descriptor
func (CompositeFilter_Operator) Descriptor() protoreflect.EnumDescriptorfunc (CompositeFilter_Operator) Enum
func (x CompositeFilter_Operator) Enum() *CompositeFilter_Operatorfunc (CompositeFilter_Operator) EnumDescriptor
func (CompositeFilter_Operator) EnumDescriptor() ([]byte, []int)Deprecated: Use CompositeFilter_Operator.Descriptor instead.
func (CompositeFilter_Operator) Number
func (x CompositeFilter_Operator) Number() protoreflect.EnumNumberfunc (CompositeFilter_Operator) String
func (x CompositeFilter_Operator) String() stringfunc (CompositeFilter_Operator) Type
func (CompositeFilter_Operator) Type() protoreflect.EnumTypeDatastoreClient
type DatastoreClient interface {
// Looks up entities by key.
Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error)
// Queries for entities.
RunQuery(ctx context.Context, in *RunQueryRequest, opts ...grpc.CallOption) (*RunQueryResponse, error)
// Runs an aggregation query.
RunAggregationQuery(ctx context.Context, in *RunAggregationQueryRequest, opts ...grpc.CallOption) (*RunAggregationQueryResponse, error)
// Begins a new transaction.
BeginTransaction(ctx context.Context, in *BeginTransactionRequest, opts ...grpc.CallOption) (*BeginTransactionResponse, error)
// Commits a transaction, optionally creating, deleting or modifying some
// entities.
Commit(ctx context.Context, in *CommitRequest, opts ...grpc.CallOption) (*CommitResponse, error)
// Rolls back a transaction.
Rollback(ctx context.Context, in *RollbackRequest, opts ...grpc.CallOption) (*RollbackResponse, error)
// Allocates IDs for the given keys, which is useful for referencing an entity
// before it is inserted.
AllocateIds(ctx context.Context, in *AllocateIdsRequest, opts ...grpc.CallOption) (*AllocateIdsResponse, error)
// Prevents the supplied keys' IDs from being auto-allocated by Cloud
// Datastore.
ReserveIds(ctx context.Context, in *ReserveIdsRequest, opts ...grpc.CallOption) (*ReserveIdsResponse, error)
}DatastoreClient is the client API for Datastore service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewDatastoreClient
func NewDatastoreClient(cc grpc.ClientConnInterface) DatastoreClientDatastoreServer
type DatastoreServer interface {
// Looks up entities by key.
Lookup(context.Context, *LookupRequest) (*LookupResponse, error)
// Queries for entities.
RunQuery(context.Context, *RunQueryRequest) (*RunQueryResponse, error)
// Runs an aggregation query.
RunAggregationQuery(context.Context, *RunAggregationQueryRequest) (*RunAggregationQueryResponse, error)
// Begins a new transaction.
BeginTransaction(context.Context, *BeginTransactionRequest) (*BeginTransactionResponse, error)
// Commits a transaction, optionally creating, deleting or modifying some
// entities.
Commit(context.Context, *CommitRequest) (*CommitResponse, error)
// Rolls back a transaction.
Rollback(context.Context, *RollbackRequest) (*RollbackResponse, error)
// Allocates IDs for the given keys, which is useful for referencing an entity
// before it is inserted.
AllocateIds(context.Context, *AllocateIdsRequest) (*AllocateIdsResponse, error)
// Prevents the supplied keys' IDs from being auto-allocated by Cloud
// Datastore.
ReserveIds(context.Context, *ReserveIdsRequest) (*ReserveIdsResponse, error)
}DatastoreServer is the server API for Datastore service. All implementations should embed UnimplementedDatastoreServer for forward compatibility
Entity
type Entity struct {
// 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.
Key *Key `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// 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 map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
// be empty.
Properties map[string]*Value `protobuf:"bytes,3,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// contains filtered or unexported fields
}A Datastore data object.
Must not exceed 1 MiB - 4 bytes.
func (*Entity) Descriptor
Deprecated: Use Entity.ProtoReflect.Descriptor instead.
func (*Entity) GetKey
func (*Entity) GetProperties
func (*Entity) ProtoMessage
func (*Entity) ProtoMessage()func (*Entity) ProtoReflect
func (x *Entity) ProtoReflect() protoreflect.Messagefunc (*Entity) Reset
func (x *Entity) Reset()func (*Entity) String
EntityResult
type EntityResult struct {
// The resulting entity.
Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
// The version of the entity, a strictly positive number that monotonically
// increases with changes to the entity.
//
// This field is set for
// [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
//
// For [missing][google.datastore.v1.LookupResponse.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.
Version int64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"`
// The time at which the entity was created.
// This field is set for
// [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
// If this entity is missing, this field will not be set.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// The time at which the entity was last changed.
// This field is set for
// [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
// If this entity is missing, this field will not be set.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// A cursor that points to the position after the result entity.
// Set only when the `EntityResult` is part of a `QueryResultBatch` message.
Cursor []byte `protobuf:"bytes,3,opt,name=cursor,proto3" json:"cursor,omitempty"`
// contains filtered or unexported fields
}The result of fetching an entity from Datastore.
func (*EntityResult) Descriptor
func (*EntityResult) Descriptor() ([]byte, []int)Deprecated: Use EntityResult.ProtoReflect.Descriptor instead.
func (*EntityResult) GetCreateTime
func (x *EntityResult) GetCreateTime() *timestamppb.Timestampfunc (*EntityResult) GetCursor
func (x *EntityResult) GetCursor() []bytefunc (*EntityResult) GetEntity
func (x *EntityResult) GetEntity() *Entityfunc (*EntityResult) GetUpdateTime
func (x *EntityResult) GetUpdateTime() *timestamppb.Timestampfunc (*EntityResult) GetVersion
func (x *EntityResult) GetVersion() int64func (*EntityResult) ProtoMessage
func (*EntityResult) ProtoMessage()func (*EntityResult) ProtoReflect
func (x *EntityResult) ProtoReflect() protoreflect.Messagefunc (*EntityResult) Reset
func (x *EntityResult) Reset()func (*EntityResult) String
func (x *EntityResult) String() stringEntityResult_ResultType
type EntityResult_ResultType int32Specifies 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).
EntityResult_RESULT_TYPE_UNSPECIFIED, EntityResult_FULL, EntityResult_PROJECTION, EntityResult_KEY_ONLY
const (
// Unspecified. This value is never used.
EntityResult_RESULT_TYPE_UNSPECIFIED EntityResult_ResultType = 0
// The key and properties.
EntityResult_FULL EntityResult_ResultType = 1
// A projected subset of properties. The entity may have no key.
EntityResult_PROJECTION EntityResult_ResultType = 2
// Only the key.
EntityResult_KEY_ONLY EntityResult_ResultType = 3
)func (EntityResult_ResultType) Descriptor
func (EntityResult_ResultType) Descriptor() protoreflect.EnumDescriptorfunc (EntityResult_ResultType) Enum
func (x EntityResult_ResultType) Enum() *EntityResult_ResultTypefunc (EntityResult_ResultType) EnumDescriptor
func (EntityResult_ResultType) EnumDescriptor() ([]byte, []int)Deprecated: Use EntityResult_ResultType.Descriptor instead.
func (EntityResult_ResultType) Number
func (x EntityResult_ResultType) Number() protoreflect.EnumNumberfunc (EntityResult_ResultType) String
func (x EntityResult_ResultType) String() stringfunc (EntityResult_ResultType) Type
func (EntityResult_ResultType) Type() protoreflect.EnumTypeExecutionStats
type ExecutionStats struct {
// Total number of results returned, including documents, projections,
// aggregation results, keys.
ResultsReturned int64 `protobuf:"varint,1,opt,name=results_returned,json=resultsReturned,proto3" json:"results_returned,omitempty"`
// Total time to execute the query in the backend.
ExecutionDuration *durationpb.Duration `protobuf:"bytes,3,opt,name=execution_duration,json=executionDuration,proto3" json:"execution_duration,omitempty"`
// Total billable read operations.
ReadOperations int64 `protobuf:"varint,4,opt,name=read_operations,json=readOperations,proto3" json:"read_operations,omitempty"`
// Debugging statistics from the execution of the query. Note that the
// debugging stats are subject to change as Firestore evolves. It could
// include:
//
// {
// "indexes_entries_scanned": "1000",
// "documents_scanned": "20",
// "billing_details" : {
// "documents_billable": "20",
// "index_entries_billable": "1000",
// "min_query_cost": "0"
// }
// }
DebugStats *structpb.Struct `protobuf:"bytes,5,opt,name=debug_stats,json=debugStats,proto3" json:"debug_stats,omitempty"`
// contains filtered or unexported fields
}Execution statistics for the query.
func (*ExecutionStats) Descriptor
func (*ExecutionStats) Descriptor() ([]byte, []int)Deprecated: Use ExecutionStats.ProtoReflect.Descriptor instead.
func (*ExecutionStats) GetDebugStats
func (x *ExecutionStats) GetDebugStats() *structpb.Structfunc (*ExecutionStats) GetExecutionDuration
func (x *ExecutionStats) GetExecutionDuration() *durationpb.Durationfunc (*ExecutionStats) GetReadOperations
func (x *ExecutionStats) GetReadOperations() int64func (*ExecutionStats) GetResultsReturned
func (x *ExecutionStats) GetResultsReturned() int64func (*ExecutionStats) ProtoMessage
func (*ExecutionStats) ProtoMessage()func (*ExecutionStats) ProtoReflect
func (x *ExecutionStats) ProtoReflect() protoreflect.Messagefunc (*ExecutionStats) Reset
func (x *ExecutionStats) Reset()func (*ExecutionStats) String
func (x *ExecutionStats) String() stringExplainMetrics
type ExplainMetrics struct {
// Planning phase information for the query.
PlanSummary *PlanSummary `protobuf:"bytes,1,opt,name=plan_summary,json=planSummary,proto3" json:"plan_summary,omitempty"`
// Aggregated stats from the execution of the query. Only present when
// [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set
// to true.
ExecutionStats *ExecutionStats `protobuf:"bytes,2,opt,name=execution_stats,json=executionStats,proto3" json:"execution_stats,omitempty"`
// contains filtered or unexported fields
}Explain metrics for the query.
func (*ExplainMetrics) Descriptor
func (*ExplainMetrics) Descriptor() ([]byte, []int)Deprecated: Use ExplainMetrics.ProtoReflect.Descriptor instead.
func (*ExplainMetrics) GetExecutionStats
func (x *ExplainMetrics) GetExecutionStats() *ExecutionStatsfunc (*ExplainMetrics) GetPlanSummary
func (x *ExplainMetrics) GetPlanSummary() *PlanSummaryfunc (*ExplainMetrics) ProtoMessage
func (*ExplainMetrics) ProtoMessage()func (*ExplainMetrics) ProtoReflect
func (x *ExplainMetrics) ProtoReflect() protoreflect.Messagefunc (*ExplainMetrics) Reset
func (x *ExplainMetrics) Reset()func (*ExplainMetrics) String
func (x *ExplainMetrics) String() stringExplainOptions
type ExplainOptions struct {
// Optional. Whether to execute this query.
//
// When false (the default), the query will be planned, returning only
// metrics from the planning stages.
//
// When true, the query will be planned and executed, returning the full
// query results along with both planning and execution stage metrics.
Analyze bool `protobuf:"varint,1,opt,name=analyze,proto3" json:"analyze,omitempty"`
// contains filtered or unexported fields
}Explain options for the query.
func (*ExplainOptions) Descriptor
func (*ExplainOptions) Descriptor() ([]byte, []int)Deprecated: Use ExplainOptions.ProtoReflect.Descriptor instead.
func (*ExplainOptions) GetAnalyze
func (x *ExplainOptions) GetAnalyze() boolfunc (*ExplainOptions) ProtoMessage
func (*ExplainOptions) ProtoMessage()func (*ExplainOptions) ProtoReflect
func (x *ExplainOptions) ProtoReflect() protoreflect.Messagefunc (*ExplainOptions) Reset
func (x *ExplainOptions) Reset()func (*ExplainOptions) String
func (x *ExplainOptions) String() stringFilter
type Filter struct {
// The type of filter.
//
// Types that are assignable to FilterType:
//
// *Filter_CompositeFilter
// *Filter_PropertyFilter
FilterType isFilter_FilterType `protobuf_oneof:"filter_type"`
// contains filtered or unexported fields
}A holder for any type of filter.
func (*Filter) Descriptor
Deprecated: Use Filter.ProtoReflect.Descriptor instead.
func (*Filter) GetCompositeFilter
func (x *Filter) GetCompositeFilter() *CompositeFilterfunc (*Filter) GetFilterType
func (m *Filter) GetFilterType() isFilter_FilterTypefunc (*Filter) GetPropertyFilter
func (x *Filter) GetPropertyFilter() *PropertyFilterfunc (*Filter) ProtoMessage
func (*Filter) ProtoMessage()func (*Filter) ProtoReflect
func (x *Filter) ProtoReflect() protoreflect.Messagefunc (*Filter) Reset
func (x *Filter) Reset()func (*Filter) String
Filter_CompositeFilter
type Filter_CompositeFilter struct {
// A composite filter.
CompositeFilter *CompositeFilter `protobuf:"bytes,1,opt,name=composite_filter,json=compositeFilter,proto3,oneof"`
}Filter_PropertyFilter
type Filter_PropertyFilter struct {
// A filter on a property.
PropertyFilter *PropertyFilter `protobuf:"bytes,2,opt,name=property_filter,json=propertyFilter,proto3,oneof"`
}FindNearest
type FindNearest struct {
// Required. An indexed vector property to search upon. Only documents which
// contain vectors whose dimensionality match the query_vector can be
// returned.
VectorProperty *PropertyReference `protobuf:"bytes,1,opt,name=vector_property,json=vectorProperty,proto3" json:"vector_property,omitempty"`
// Required. The query vector that we are searching on. Must be a vector of no
// more than 2048 dimensions.
QueryVector *Value `protobuf:"bytes,2,opt,name=query_vector,json=queryVector,proto3" json:"query_vector,omitempty"`
// Required. The Distance Measure to use, required.
DistanceMeasure FindNearest_DistanceMeasure `protobuf:"varint,3,opt,name=distance_measure,json=distanceMeasure,proto3,enum=google.datastore.v1.FindNearest_DistanceMeasure" json:"distance_measure,omitempty"`
// Required. The number of nearest neighbors to return. Must be a positive
// integer of no more than 100.
Limit *wrapperspb.Int32Value `protobuf:"bytes,4,opt,name=limit,proto3" json:"limit,omitempty"`
// Optional. Optional name of the field to output the result of the vector
// distance calculation. Must conform to [entity
// property][google.datastore.v1.Entity.properties] limitations.
DistanceResultProperty string `protobuf:"bytes,5,opt,name=distance_result_property,json=distanceResultProperty,proto3" json:"distance_result_property,omitempty"`
// Optional. Option to specify a threshold for which no less similar documents
// will be returned. The behavior of the specified `distance_measure` will
// affect the meaning of the distance threshold. Since DOT_PRODUCT distances
// increase when the vectors are more similar, the comparison is inverted.
//
// For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold="" for="" dot_product:="" where="" distance="">= distance_threshold
DistanceThreshold *wrapperspb.DoubleValue `protobuf:"bytes,6,opt,name=distance_threshold,json=distanceThreshold,proto3" json:"distance_threshold,omitempty"`
// contains filtered or unexported fields
}Nearest Neighbors search config. The ordering provided by FindNearest supersedes the order_by stage. If multiple documents have the same vector distance, the returned document order is not guaranteed to be stable between queries.
func (*FindNearest) Descriptor
func (*FindNearest) Descriptor() ([]byte, []int)Deprecated: Use FindNearest.ProtoReflect.Descriptor instead.
func (*FindNearest) GetDistanceMeasure
func (x *FindNearest) GetDistanceMeasure() FindNearest_DistanceMeasurefunc (*FindNearest) GetDistanceResultProperty
func (x *FindNearest) GetDistanceResultProperty() stringfunc (*FindNearest) GetDistanceThreshold
func (x *FindNearest) GetDistanceThreshold() *wrapperspb.DoubleValuefunc (*FindNearest) GetLimit
func (x *FindNearest) GetLimit() *wrapperspb.Int32Valuefunc (*FindNearest) GetQueryVector
func (x *FindNearest) GetQueryVector() *Valuefunc (*FindNearest) GetVectorProperty
func (x *FindNearest) GetVectorProperty() *PropertyReferencefunc (*FindNearest) ProtoMessage
func (*FindNearest) ProtoMessage()func (*FindNearest) ProtoReflect
func (x *FindNearest) ProtoReflect() protoreflect.Messagefunc (*FindNearest) Reset
func (x *FindNearest) Reset()func (*FindNearest) String
func (x *FindNearest) String() stringFindNearest_DistanceMeasure
type FindNearest_DistanceMeasure int32The distance measure to use when comparing vectors.
FindNearest_DISTANCE_MEASURE_UNSPECIFIED, FindNearest_EUCLIDEAN, FindNearest_COSINE, FindNearest_DOT_PRODUCT
const (
// Should not be set.
FindNearest_DISTANCE_MEASURE_UNSPECIFIED FindNearest_DistanceMeasure = 0
// Measures the EUCLIDEAN distance between the vectors. See
// [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn
// more. The resulting distance decreases the more similar two vectors are.
FindNearest_EUCLIDEAN FindNearest_DistanceMeasure = 1
// COSINE distance compares vectors based on the angle between them, which
// allows you to measure similarity that isn't based on the vectors
// magnitude. We recommend using DOT_PRODUCT with unit normalized vectors
// instead of COSINE distance, which is mathematically equivalent with
// better performance. See [Cosine
// Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn
// more about COSINE similarity and COSINE distance. The resulting COSINE
// distance decreases the more similar two vectors are.
FindNearest_COSINE FindNearest_DistanceMeasure = 2
// Similar to cosine but is affected by the magnitude of the vectors. See
// [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more.
// The resulting distance increases the more similar two vectors are.
FindNearest_DOT_PRODUCT FindNearest_DistanceMeasure = 3
)func (FindNearest_DistanceMeasure) Descriptor
func (FindNearest_DistanceMeasure) Descriptor() protoreflect.EnumDescriptorfunc (FindNearest_DistanceMeasure) Enum
func (x FindNearest_DistanceMeasure) Enum() *FindNearest_DistanceMeasurefunc (FindNearest_DistanceMeasure) EnumDescriptor
func (FindNearest_DistanceMeasure) EnumDescriptor() ([]byte, []int)Deprecated: Use FindNearest_DistanceMeasure.Descriptor instead.
func (FindNearest_DistanceMeasure) Number
func (x FindNearest_DistanceMeasure) Number() protoreflect.EnumNumberfunc (FindNearest_DistanceMeasure) String
func (x FindNearest_DistanceMeasure) String() stringfunc (FindNearest_DistanceMeasure) Type
func (FindNearest_DistanceMeasure) Type() protoreflect.EnumTypeGqlQuery
type GqlQuery struct {
// A string of the format described
// [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
QueryString string `protobuf:"bytes,1,opt,name=query_string,json=queryString,proto3" json:"query_string,omitempty"`
// 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.
AllowLiterals bool `protobuf:"varint,2,opt,name=allow_literals,json=allowLiterals,proto3" json:"allow_literals,omitempty"`
// 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 `""`.
NamedBindings map[string]*GqlQueryParameter `protobuf:"bytes,5,rep,name=named_bindings,json=namedBindings,proto3" json:"named_bindings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// 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.
PositionalBindings []*GqlQueryParameter `protobuf:"bytes,4,rep,name=positional_bindings,json=positionalBindings,proto3" json:"positional_bindings,omitempty"`
// contains filtered or unexported fields
}A GQL query.
func (*GqlQuery) Descriptor
Deprecated: Use GqlQuery.ProtoReflect.Descriptor instead.
func (*GqlQuery) GetAllowLiterals
func (*GqlQuery) GetNamedBindings
func (x *GqlQuery) GetNamedBindings() map[string]*GqlQueryParameterfunc (*GqlQuery) GetPositionalBindings
func (x *GqlQuery) GetPositionalBindings() []*GqlQueryParameterfunc (*GqlQuery) GetQueryString
func (*GqlQuery) ProtoMessage
func (*GqlQuery) ProtoMessage()func (*GqlQuery) ProtoReflect
func (x *GqlQuery) ProtoReflect() protoreflect.Messagefunc (*GqlQuery) Reset
func (x *GqlQuery) Reset()func (*GqlQuery) String
GqlQueryParameter
type GqlQueryParameter struct {
// The type of parameter.
//
// Types that are assignable to ParameterType:
//
// *GqlQueryParameter_Value
// *GqlQueryParameter_Cursor
ParameterType isGqlQueryParameter_ParameterType `protobuf_oneof:"parameter_type"`
// contains filtered or unexported fields
}A binding parameter for a GQL query.
func (*GqlQueryParameter) Descriptor
func (*GqlQueryParameter) Descriptor() ([]byte, []int)Deprecated: Use GqlQueryParameter.ProtoReflect.Descriptor instead.
func (*GqlQueryParameter) GetCursor
func (x *GqlQueryParameter) GetCursor() []bytefunc (*GqlQueryParameter) GetParameterType
func (m *GqlQueryParameter) GetParameterType() isGqlQueryParameter_ParameterTypefunc (*GqlQueryParameter) GetValue
func (x *GqlQueryParameter) GetValue() *Valuefunc (*GqlQueryParameter) ProtoMessage
func (*GqlQueryParameter) ProtoMessage()func (*GqlQueryParameter) ProtoReflect
func (x *GqlQueryParameter) ProtoReflect() protoreflect.Messagefunc (*GqlQueryParameter) Reset
func (x *GqlQueryParameter) Reset()func (*GqlQueryParameter) String
func (x *GqlQueryParameter) String() stringGqlQueryParameter_Cursor
type GqlQueryParameter_Cursor struct {
// A query cursor. Query cursors are returned in query
// result batches.
Cursor []byte `protobuf:"bytes,3,opt,name=cursor,proto3,oneof"`
}GqlQueryParameter_Value
type GqlQueryParameter_Value struct {
// A value parameter.
Value *Value `protobuf:"bytes,2,opt,name=value,proto3,oneof"`
}Key
type Key struct {
// Entities are partitioned into subsets, currently identified by a project
// ID and namespace ID.
// Queries are scoped to a single partition.
PartitionId *PartitionId `protobuf:"bytes,1,opt,name=partition_id,json=partitionId,proto3" json:"partition_id,omitempty"`
// 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.
Path []*Key_PathElement `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"`
// contains filtered or unexported fields
}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.
func (*Key) Descriptor
Deprecated: Use Key.ProtoReflect.Descriptor instead.
func (*Key) GetPartitionId
func (x *Key) GetPartitionId() *PartitionIdfunc (*Key) GetPath
func (x *Key) GetPath() []*Key_PathElementfunc (*Key) ProtoMessage
func (*Key) ProtoMessage()func (*Key) ProtoReflect
func (x *Key) ProtoReflect() protoreflect.Messagefunc (*Key) Reset
func (x *Key) Reset()func (*Key) String
Key_PathElement
type Key_PathElement struct {
// 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 `""`.
//
// Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
// encoded as `__bytesA (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.
func (*Key_PathElement) Descriptor
func (*Key_PathElement) Descriptor() ([]byte, []int)Deprecated: Use Key_PathElement.ProtoReflect.Descriptor instead.
func (*Key_PathElement) GetId
func (x *Key_PathElement) GetId() int64func (*Key_PathElement) GetIdType
func (m *Key_PathElement) GetIdType() isKey_PathElement_IdTypefunc (*Key_PathElement) GetKind
func (x *Key_PathElement) GetKind() stringfunc (*Key_PathElement) GetName
func (x *Key_PathElement) GetName() stringfunc (*Key_PathElement) ProtoMessage
func (*Key_PathElement) ProtoMessage()func (*Key_PathElement) ProtoReflect
func (x *Key_PathElement) ProtoReflect() protoreflect.Messagefunc (*Key_PathElement) Reset
func (x *Key_PathElement) Reset()func (*Key_PathElement) String
func (x *Key_PathElement) String() stringKey_PathElement_Id
type Key_PathElement_Id struct {
// 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.
Id int64 `protobuf:"varint,2,opt,name=id,proto3,oneof"`
}Key_PathElement_Name
type Key_PathElement_Name struct {
// 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 `""`.
//
// Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
// encoded as `__bytesKindExpression
type KindExpression struct {
// The name of the kind.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}A representation of a kind.
func (*KindExpression) Descriptor
func (*KindExpression) Descriptor() ([]byte, []int)Deprecated: Use KindExpression.ProtoReflect.Descriptor instead.
func (*KindExpression) GetName
func (x *KindExpression) GetName() stringfunc (*KindExpression) ProtoMessage
func (*KindExpression) ProtoMessage()func (*KindExpression) ProtoReflect
func (x *KindExpression) ProtoReflect() protoreflect.Messagefunc (*KindExpression) Reset
func (x *KindExpression) Reset()func (*KindExpression) String
func (x *KindExpression) String() stringLookupRequest
type LookupRequest struct {
// Required. The ID of the project against which to make the request.
ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string ” to refer the default
// database.
DatabaseId string `protobuf:"bytes,9,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"`
// The options for this lookup request.
ReadOptions *ReadOptions `protobuf:"bytes,1,opt,name=read_options,json=readOptions,proto3" json:"read_options,omitempty"`
// Required. Keys of entities to look up.
Keys []*Key `protobuf:"bytes,3,rep,name=keys,proto3" json:"keys,omitempty"`
// The properties to return. Defaults to returning all properties.
//
// If this field is set and an entity has a property not referenced in the
// mask, it will be absent from [LookupResponse.found.entity.properties][].
//
// The entity's key is always returned.
PropertyMask *PropertyMask `protobuf:"bytes,5,opt,name=property_mask,json=propertyMask,proto3" json:"property_mask,omitempty"`
// contains filtered or unexported fields
}The request for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup].
func (*LookupRequest) Descriptor
func (*LookupRequest) Descriptor() ([]byte, []int)Deprecated: Use LookupRequest.ProtoReflect.Descriptor instead.
func (*LookupRequest) GetDatabaseId
func (x *LookupRequest) GetDatabaseId() stringfunc (*LookupRequest) GetKeys
func (x *LookupRequest) GetKeys() []*Keyfunc (*LookupRequest) GetProjectId
func (x *LookupRequest) GetProjectId() stringfunc (*LookupRequest) GetPropertyMask
func (x *LookupRequest) GetPropertyMask() *PropertyMaskfunc (*LookupRequest) GetReadOptions
func (x *LookupRequest) GetReadOptions() *ReadOptionsfunc (*LookupRequest) ProtoMessage
func (*LookupRequest) ProtoMessage()func (*LookupRequest) ProtoReflect
func (x *LookupRequest) ProtoReflect() protoreflect.Messagefunc (*LookupRequest) Reset
func (x *LookupRequest) Reset()func (*LookupRequest) String
func (x *LookupRequest) String() stringLookupResponse
type LookupResponse struct {
// 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.
Found []*EntityResult `protobuf:"bytes,1,rep,name=found,proto3" json:"found,omitempty"`
// 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.
Missing []*EntityResult `protobuf:"bytes,2,rep,name=missing,proto3" json:"missing,omitempty"`
// 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.
Deferred []*Key `protobuf:"bytes,3,rep,name=deferred,proto3" json:"deferred,omitempty"`
// The identifier of the transaction that was started as part of this Lookup
// request.
//
// Set only when
// [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction]
// was set in
// [LookupRequest.read_options][google.datastore.v1.LookupRequest.read_options].
Transaction []byte `protobuf:"bytes,5,opt,name=transaction,proto3" json:"transaction,omitempty"`
// The time at which these entities were read or found missing.
ReadTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
// contains filtered or unexported fields
}The response for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup].
func (*LookupResponse) Descriptor
func (*LookupResponse) Descriptor() ([]byte, []int)Deprecated: Use LookupResponse.ProtoReflect.Descriptor instead.
func (*LookupResponse) GetDeferred
func (x *LookupResponse) GetDeferred() []*Keyfunc (*LookupResponse) GetFound
func (x *LookupResponse) GetFound() []*EntityResultfunc (*LookupResponse) GetMissing
func (x *LookupResponse) GetMissing() []*EntityResultfunc (*LookupResponse) GetReadTime
func (x *LookupResponse) GetReadTime() *timestamppb.Timestampfunc (*LookupResponse) GetTransaction
func (x *LookupResponse) GetTransaction() []bytefunc (*LookupResponse) ProtoMessage
func (*LookupResponse) ProtoMessage()func (*LookupResponse) ProtoReflect
func (x *LookupResponse) ProtoReflect() protoreflect.Messagefunc (*LookupResponse) Reset
func (x *LookupResponse) Reset()func (*LookupResponse) String
func (x *LookupResponse) String() stringMutation
type Mutation struct {
// The mutation operation.
//
// For `insert`, `update`, and `upsert`:
// - The entity's key must not be reserved/read-only.
// - No property in the entity may have a reserved name,
// not even a property in an entity in a value.
// - No value in the entity may have meaning 18,
// not even a value in an entity in another value.
//
// Types that are assignable to Operation:
//
// *Mutation_Insert
// *Mutation_Update
// *Mutation_Upsert
// *Mutation_Delete
Operation isMutation_Operation `protobuf_oneof:"operation"`
// When set, the server will detect whether or not this mutation conflicts
// with the current version of the entity on the server. Conflicting mutations
// are not applied, and are marked as such in MutationResult.
//
// Types that are assignable to ConflictDetectionStrategy:
//
// *Mutation_BaseVersion
// *Mutation_UpdateTime
ConflictDetectionStrategy isMutation_ConflictDetectionStrategy `protobuf_oneof:"conflict_detection_strategy"`
// The strategy to use when a conflict is detected. Defaults to
// `SERVER_VALUE`.
// If this is set, then `conflict_detection_strategy` must also be set.
ConflictResolutionStrategy Mutation_ConflictResolutionStrategy `protobuf:"varint,10,opt,name=conflict_resolution_strategy,json=conflictResolutionStrategy,proto3,enum=google.datastore.v1.Mutation_ConflictResolutionStrategy" json:"conflict_resolution_strategy,omitempty"`
// The properties to write in this mutation.
// None of the properties in the mask may have a reserved name, except for
// `__key__`.
// This field is ignored for `delete`.
//
// If the entity already exists, only properties referenced in the mask are
// updated, others are left untouched.
// Properties referenced in the mask but not in the entity are deleted.
PropertyMask *PropertyMask `protobuf:"bytes,9,opt,name=property_mask,json=propertyMask,proto3" json:"property_mask,omitempty"`
// Optional. The transforms to perform on the entity.
//
// This field can be set only when the operation is `insert`, `update`,
// or `upsert`. If present, the transforms are be applied to the entity
// regardless of the property mask, in order, after the operation.
PropertyTransforms []*PropertyTransform `protobuf:"bytes,12,rep,name=property_transforms,json=propertyTransforms,proto3" json:"property_transforms,omitempty"`
// contains filtered or unexported fields
}A mutation to apply to an entity.
func (*Mutation) Descriptor
Deprecated: Use Mutation.ProtoReflect.Descriptor instead.
func (*Mutation) GetBaseVersion
func (*Mutation) GetConflictDetectionStrategy
func (m *Mutation) GetConflictDetectionStrategy() isMutation_ConflictDetectionStrategyfunc (*Mutation) GetConflictResolutionStrategy
func (x *Mutation) GetConflictResolutionStrategy() Mutation_ConflictResolutionStrategyfunc (*Mutation) GetDelete
func (*Mutation) GetInsert
func (*Mutation) GetOperation
func (m *Mutation) GetOperation() isMutation_Operationfunc (*Mutation) GetPropertyMask
func (x *Mutation) GetPropertyMask() *PropertyMaskfunc (*Mutation) GetPropertyTransforms
func (x *Mutation) GetPropertyTransforms() []*PropertyTransformfunc (*Mutation) GetUpdate
func (*Mutation) GetUpdateTime
func (x *Mutation) GetUpdateTime() *timestamppb.Timestampfunc (*Mutation) GetUpsert
func (*Mutation) ProtoMessage
func (*Mutation) ProtoMessage()func (*Mutation) ProtoReflect
func (x *Mutation) ProtoReflect() protoreflect.Messagefunc (*Mutation) Reset
func (x *Mutation) Reset()func (*Mutation) String
MutationResult
type MutationResult struct {
// The automatically allocated key.
// Set only when the mutation allocated a key.
Key *Key `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
// 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.
Version int64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"`
// The create time of the entity. This field will not be set after a 'delete'.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// The update time of the entity on the server after processing the mutation.
// If the mutation doesn't change anything on the server, then the timestamp
// will be the update timestamp of the current entity. This field will not be
// set after a 'delete'.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// Whether a conflict was detected for this mutation. Always false when a
// conflict detection strategy field is not set in the mutation.
ConflictDetected bool `protobuf:"varint,5,opt,name=conflict_detected,json=conflictDetected,proto3" json:"conflict_detected,omitempty"`
// The results of applying each
// [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
// order of the request.
TransformResults []*Value `protobuf:"bytes,8,rep,name=transform_results,json=transformResults,proto3" json:"transform_results,omitempty"`
// contains filtered or unexported fields
}The result of applying a mutation.
func (*MutationResult) Descriptor
func (*MutationResult) Descriptor() ([]byte, []int)Deprecated: Use MutationResult.ProtoReflect.Descriptor instead.
func (*MutationResult) GetConflictDetected
func (x *MutationResult) GetConflictDetected() boolfunc (*MutationResult) GetCreateTime
func (x *MutationResult) GetCreateTime() *timestamppb.Timestampfunc (*MutationResult) GetKey
func (x *MutationResult) GetKey() *Keyfunc (*MutationResult) GetTransformResults
func (x *MutationResult) GetTransformResults() []*Valuefunc (*MutationResult) GetUpdateTime
func (x *MutationResult) GetUpdateTime() *timestamppb.Timestampfunc (*MutationResult) GetVersion
func (x *MutationResult) GetVersion() int64func (*MutationResult) ProtoMessage
func (*MutationResult) ProtoMessage()func (*MutationResult) ProtoReflect
func (x *MutationResult) ProtoReflect() protoreflect.Messagefunc (*MutationResult) Reset
func (x *MutationResult) Reset()func (*MutationResult) String
func (x *MutationResult) String() stringMutation_BaseVersion
type Mutation_BaseVersion struct {
// 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.
BaseVersion int64 `protobuf:"varint,8,opt,name=base_version,json=baseVersion,proto3,oneof"`
}Mutation_ConflictResolutionStrategy
type Mutation_ConflictResolutionStrategy int32The possible ways to resolve a conflict detected in a mutation.
Mutation_STRATEGY_UNSPECIFIED, Mutation_SERVER_VALUE, Mutation_FAIL
const (
// Unspecified. Defaults to `SERVER_VALUE`.
Mutation_STRATEGY_UNSPECIFIED Mutation_ConflictResolutionStrategy = 0
// The server entity is kept.
Mutation_SERVER_VALUE Mutation_ConflictResolutionStrategy = 1
// The whole commit request fails.
Mutation_FAIL Mutation_ConflictResolutionStrategy = 3
)func (Mutation_ConflictResolutionStrategy) Descriptor
func (Mutation_ConflictResolutionStrategy) Descriptor() protoreflect.EnumDescriptorfunc (Mutation_ConflictResolutionStrategy) Enum
func (x Mutation_ConflictResolutionStrategy) Enum() *Mutation_ConflictResolutionStrategyfunc (Mutation_ConflictResolutionStrategy) EnumDescriptor
func (Mutation_ConflictResolutionStrategy) EnumDescriptor() ([]byte, []int)Deprecated: Use Mutation_ConflictResolutionStrategy.Descriptor instead.
func (Mutation_ConflictResolutionStrategy) Number
func (x Mutation_ConflictResolutionStrategy) Number() protoreflect.EnumNumberfunc (Mutation_ConflictResolutionStrategy) String
func (x Mutation_ConflictResolutionStrategy) String() stringfunc (Mutation_ConflictResolutionStrategy) Type
func (Mutation_ConflictResolutionStrategy) Type() protoreflect.EnumTypeMutation_Delete
type Mutation_Delete struct {
// 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.
Delete *Key `protobuf:"bytes,7,opt,name=delete,proto3,oneof"`
}Mutation_Insert
type Mutation_Insert struct {
// The entity to insert. The entity must not already exist.
// The entity key's final path element may be incomplete.
Insert *Entity `protobuf:"bytes,4,opt,name=insert,proto3,oneof"`
}Mutation_Update
type Mutation_Update struct {
// The entity to update. The entity must already exist.
// Must have a complete key path.
Update *Entity `protobuf:"bytes,5,opt,name=update,proto3,oneof"`
}Mutation_UpdateTime
type Mutation_UpdateTime struct {
// The update time of the entity that this mutation is being applied
// to. If this does not match the current update time on the server, the
// mutation conflicts.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=update_time,json=updateTime,proto3,oneof"`
}Mutation_Upsert
type Mutation_Upsert struct {
// The entity to upsert. The entity may or may not already exist.
// The entity key's final path element may be incomplete.
Upsert *Entity `protobuf:"bytes,6,opt,name=upsert,proto3,oneof"`
}PartitionId
type PartitionId struct {
// The ID of the project to which the entities belong.
ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
// If not empty, the ID of the database to which the entities
// belong.
DatabaseId string `protobuf:"bytes,3,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"`
// If not empty, the ID of the namespace to which the entities belong.
NamespaceId string `protobuf:"bytes,4,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"`
// contains filtered or unexported fields
}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.
func (*PartitionId) Descriptor
func (*PartitionId) Descriptor() ([]byte, []int)Deprecated: Use PartitionId.ProtoReflect.Descriptor instead.
func (*PartitionId) GetDatabaseId
func (x *PartitionId) GetDatabaseId() stringfunc (*PartitionId) GetNamespaceId
func (x *PartitionId) GetNamespaceId() stringfunc (*PartitionId) GetProjectId
func (x *PartitionId) GetProjectId() stringfunc (*PartitionId) ProtoMessage
func (*PartitionId) ProtoMessage()func (*PartitionId) ProtoReflect
func (x *PartitionId) ProtoReflect() protoreflect.Messagefunc (*PartitionId) Reset
func (x *PartitionId) Reset()func (*PartitionId) String
func (x *PartitionId) String() stringPlanSummary
type PlanSummary struct {
// The indexes selected for the query. For example:
//
// [
// {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
// {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
// ]
IndexesUsed []*structpb.Struct `protobuf:"bytes,1,rep,name=indexes_used,json=indexesUsed,proto3" json:"indexes_used,omitempty"`
// contains filtered or unexported fields
}Planning phase information for the query.
func (*PlanSummary) Descriptor
func (*PlanSummary) Descriptor() ([]byte, []int)Deprecated: Use PlanSummary.ProtoReflect.Descriptor instead.
func (*PlanSummary) GetIndexesUsed
func (x *PlanSummary) GetIndexesUsed() []*structpb.Structfunc (*PlanSummary) ProtoMessage
func (*PlanSummary) ProtoMessage()func (*PlanSummary) ProtoReflect
func (x *PlanSummary) ProtoReflect() protoreflect.Messagefunc (*PlanSummary) Reset
func (x *PlanSummary) Reset()func (*PlanSummary) String
func (x *PlanSummary) String() stringProjection
type Projection struct {
// The property to project.
Property *PropertyReference `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
// contains filtered or unexported fields
}A representation of a property in a projection.
func (*Projection) Descriptor
func (*Projection) Descriptor() ([]byte, []int)Deprecated: Use Projection.ProtoReflect.Descriptor instead.
func (*Projection) GetProperty
func (x *Projection) GetProperty() *PropertyReferencefunc (*Projection) ProtoMessage
func (*Projection) ProtoMessage()func (*Projection) ProtoReflect
func (x *Projection) ProtoReflect() protoreflect.Messagefunc (*Projection) Reset
func (x *Projection) Reset()func (*Projection) String
func (x *Projection) String() stringPropertyFilter
type PropertyFilter struct {
// The property to filter by.
Property *PropertyReference `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
// The operator to filter by.
Op PropertyFilter_Operator `protobuf:"varint,2,opt,name=op,proto3,enum=google.datastore.v1.PropertyFilter_Operator" json:"op,omitempty"`
// The value to compare the property to.
Value *Value `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}A filter on a specific property.
func (*PropertyFilter) Descriptor
func (*PropertyFilter) Descriptor() ([]byte, []int)Deprecated: Use PropertyFilter.ProtoReflect.Descriptor instead.
func (*PropertyFilter) GetOp
func (x *PropertyFilter) GetOp() PropertyFilter_Operatorfunc (*PropertyFilter) GetProperty
func (x *PropertyFilter) GetProperty() *PropertyReferencefunc (*PropertyFilter) GetValue
func (x *PropertyFilter) GetValue() *Valuefunc (*PropertyFilter) ProtoMessage
func (*PropertyFilter) ProtoMessage()func (*PropertyFilter) ProtoReflect
func (x *PropertyFilter) ProtoReflect() protoreflect.Messagefunc (*PropertyFilter) Reset
func (x *PropertyFilter) Reset()func (*PropertyFilter) String
func (x *PropertyFilter) String() stringPropertyFilter_Operator
type PropertyFilter_Operator int32A property filter operator.
PropertyFilter_OPERATOR_UNSPECIFIED, PropertyFilter_LESS_THAN, PropertyFilter_LESS_THAN_OR_EQUAL, PropertyFilter_GREATER_THAN, PropertyFilter_GREATER_THAN_OR_EQUAL, PropertyFilter_EQUAL, PropertyFilter_IN, PropertyFilter_NOT_EQUAL, PropertyFilter_HAS_ANCESTOR, PropertyFilter_NOT_IN
const (
// Unspecified. This value must not be used.
PropertyFilter_OPERATOR_UNSPECIFIED PropertyFilter_Operator = 0
// The given `property` is less than the given `value`.
//
// Requires:
//
// * That `property` comes first in `order_by`.
PropertyFilter_LESS_THAN PropertyFilter_Operator = 1
// The given `property` is less than or equal to the given `value`.
//
// Requires:
//
// * That `property` comes first in `order_by`.
PropertyFilter_LESS_THAN_OR_EQUAL PropertyFilter_Operator = 2
// The given `property` is greater than the given `value`.
//
// Requires:
//
// * That `property` comes first in `order_by`.
PropertyFilter_GREATER_THAN PropertyFilter_Operator = 3
// The given `property` is greater than or equal to the given `value`.
//
// Requires:
//
// * That `property` comes first in `order_by`.
PropertyFilter_GREATER_THAN_OR_EQUAL PropertyFilter_Operator = 4
// The given `property` is equal to the given `value`.
PropertyFilter_EQUAL PropertyFilter_Operator = 5
// The given `property` is equal to at least one value in the given array.
//
// Requires:
//
// - That `value` is a non-empty `ArrayValue`, subject to disjunction
// limits.
// - No `NOT_IN` is in the same query.
PropertyFilter_IN PropertyFilter_Operator = 6
// The given `property` is not equal to the given `value`.
//
// Requires:
//
// * No other `NOT_EQUAL` or `NOT_IN` is in the same query.
// * That `property` comes first in the `order_by`.
PropertyFilter_NOT_EQUAL PropertyFilter_Operator = 9
// Limit the result set to the given entity and its descendants.
//
// Requires:
//
// * That `value` is an entity key.
// * All evaluated disjunctions must have the same `HAS_ANCESTOR` filter.
PropertyFilter_HAS_ANCESTOR PropertyFilter_Operator = 11
// The value of the `property` is not in the given array.
//
// Requires:
//
// * That `value` is a non-empty `ArrayValue` with at most 10 values.
// * No other `OR`, `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query.
// * That `field` comes first in the `order_by`.
PropertyFilter_NOT_IN PropertyFilter_Operator = 13
)func (PropertyFilter_Operator) Descriptor
func (PropertyFilter_Operator) Descriptor() protoreflect.EnumDescriptorfunc (PropertyFilter_Operator) Enum
func (x PropertyFilter_Operator) Enum() *PropertyFilter_Operatorfunc (PropertyFilter_Operator) EnumDescriptor
func (PropertyFilter_Operator) EnumDescriptor() ([]byte, []int)Deprecated: Use PropertyFilter_Operator.Descriptor instead.
func (PropertyFilter_Operator) Number
func (x PropertyFilter_Operator) Number() protoreflect.EnumNumberfunc (PropertyFilter_Operator) String
func (x PropertyFilter_Operator) String() stringfunc (PropertyFilter_Operator) Type
func (PropertyFilter_Operator) Type() protoreflect.EnumTypePropertyMask
type PropertyMask struct {
// The paths to the properties covered by this mask.
//
// A path is a list of property names separated by dots (`.`), for example
// `foo.bar` means the property `bar` inside the entity property `foo` inside
// the entity associated with this path.
//
// If a property name contains a dot `.` or a backslash `\`, then that
// name must be escaped.
//
// A path must not be empty, and may not reference a value inside an
// [array value][google.datastore.v1.Value.array_value].
Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
// contains filtered or unexported fields
}The set of arbitrarily nested property paths used to restrict an operation to only a subset of properties in an entity.
func (*PropertyMask) Descriptor
func (*PropertyMask) Descriptor() ([]byte, []int)Deprecated: Use PropertyMask.ProtoReflect.Descriptor instead.
func (*PropertyMask) GetPaths
func (x *PropertyMask) GetPaths() []stringfunc (*PropertyMask) ProtoMessage
func (*PropertyMask) ProtoMessage()func (*PropertyMask) ProtoReflect
func (x *PropertyMask) ProtoReflect() protoreflect.Messagefunc (*PropertyMask) Reset
func (x *PropertyMask) Reset()func (*PropertyMask) String
func (x *PropertyMask) String() stringPropertyOrder
type PropertyOrder struct {
// The property to order by.
Property *PropertyReference `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
// The direction to order by. Defaults to `ASCENDING`.
Direction PropertyOrder_Direction `protobuf:"varint,2,opt,name=direction,proto3,enum=google.datastore.v1.PropertyOrder_Direction" json:"direction,omitempty"`
// contains filtered or unexported fields
}The desired order for a specific property.
func (*PropertyOrder) Descriptor
func (*PropertyOrder) Descriptor() ([]byte, []int)Deprecated: Use PropertyOrder.ProtoReflect.Descriptor instead.
func (*PropertyOrder) GetDirection
func (x *PropertyOrder) GetDirection() PropertyOrder_Directionfunc (*PropertyOrder) GetProperty
func (x *PropertyOrder) GetProperty() *PropertyReferencefunc (*PropertyOrder) ProtoMessage
func (*PropertyOrder) ProtoMessage()func (*PropertyOrder) ProtoReflect
func (x *PropertyOrder) ProtoReflect() protoreflect.Messagefunc (*PropertyOrder) Reset
func (x *PropertyOrder) Reset()func (*PropertyOrder) String
func (x *PropertyOrder) String() stringPropertyOrder_Direction
type PropertyOrder_Direction int32The sort direction.
PropertyOrder_DIRECTION_UNSPECIFIED, PropertyOrder_ASCENDING, PropertyOrder_DESCENDING
const (
// Unspecified. This value must not be used.
PropertyOrder_DIRECTION_UNSPECIFIED PropertyOrder_Direction = 0
// Ascending.
PropertyOrder_ASCENDING PropertyOrder_Direction = 1
// Descending.
PropertyOrder_DESCENDING PropertyOrder_Direction = 2
)func (PropertyOrder_Direction) Descriptor
func (PropertyOrder_Direction) Descriptor() protoreflect.EnumDescriptorfunc (PropertyOrder_Direction) Enum
func (x PropertyOrder_Direction) Enum() *PropertyOrder_Directionfunc (PropertyOrder_Direction) EnumDescriptor
func (PropertyOrder_Direction) EnumDescriptor() ([]byte, []int)Deprecated: Use PropertyOrder_Direction.Descriptor instead.
func (PropertyOrder_Direction) Number
func (x PropertyOrder_Direction) Number() protoreflect.EnumNumberfunc (PropertyOrder_Direction) String
func (x PropertyOrder_Direction) String() stringfunc (PropertyOrder_Direction) Type
func (PropertyOrder_Direction) Type() protoreflect.EnumTypePropertyReference
type PropertyReference struct {
// A reference to a property.
//
// Requires:
//
// * MUST be a dot-delimited (`.`) string of segments, where each segment
// conforms to [entity property name][google.datastore.v1.Entity.properties]
// limitations.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}A reference to a property relative to the kind expressions.
func (*PropertyReference) Descriptor
func (*PropertyReference) Descriptor() ([]byte, []int)Deprecated: Use PropertyReference.ProtoReflect.Descriptor instead.
func (*PropertyReference) GetName
func (x *PropertyReference) GetName() stringfunc (*PropertyReference) ProtoMessage
func (*PropertyReference) ProtoMessage()func (*PropertyReference) ProtoReflect
func (x *PropertyReference) ProtoReflect() protoreflect.Messagefunc (*PropertyReference) Reset
func (x *PropertyReference) Reset()func (*PropertyReference) String
func (x *PropertyReference) String() stringPropertyTransform
type PropertyTransform struct {
// Optional. The name of the property.
//
// Property paths (a list of property names separated by dots (`.`)) may be
// used to refer to properties inside entity values. For example `foo.bar`
// means the property `bar` inside the entity property `foo`.
//
// If a property name contains a dot `.` or a backlslash `\`, then that name
// must be escaped.
Property string `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
// The transformation to apply to the property.
//
// Types that are assignable to TransformType:
//
// *PropertyTransform_SetToServerValue
// *PropertyTransform_Increment
// *PropertyTransform_Maximum
// *PropertyTransform_Minimum
// *PropertyTransform_AppendMissingElements
// *PropertyTransform_RemoveAllFromArray
TransformType isPropertyTransform_TransformType `protobuf_oneof:"transform_type"`
// contains filtered or unexported fields
}A transformation of an entity property.
func (*PropertyTransform) Descriptor
func (*PropertyTransform) Descriptor() ([]byte, []int)Deprecated: Use PropertyTransform.ProtoReflect.Descriptor instead.
func (*PropertyTransform) GetAppendMissingElements
func (x *PropertyTransform) GetAppendMissingElements() *ArrayValuefunc (*PropertyTransform) GetIncrement
func (x *PropertyTransform) GetIncrement() *Valuefunc (*PropertyTransform) GetMaximum
func (x *PropertyTransform) GetMaximum() *Valuefunc (*PropertyTransform) GetMinimum
func (x *PropertyTransform) GetMinimum() *Valuefunc (*PropertyTransform) GetProperty
func (x *PropertyTransform) GetProperty() stringfunc (*PropertyTransform) GetRemoveAllFromArray
func (x *PropertyTransform) GetRemoveAllFromArray() *ArrayValuefunc (*PropertyTransform) GetSetToServerValue
func (x *PropertyTransform) GetSetToServerValue() PropertyTransform_ServerValuefunc (*PropertyTransform) GetTransformType
func (m *PropertyTransform) GetTransformType() isPropertyTransform_TransformTypefunc (*PropertyTransform) ProtoMessage
func (*PropertyTransform) ProtoMessage()func (*PropertyTransform) ProtoReflect
func (x *PropertyTransform) ProtoReflect() protoreflect.Messagefunc (*PropertyTransform) Reset
func (x *PropertyTransform) Reset()func (*PropertyTransform) String
func (x *PropertyTransform) String() stringPropertyTransform_AppendMissingElements
type PropertyTransform_AppendMissingElements struct {
// Appends the given elements in order if they are not already present in
// the current property value.
// If the property is not an array, or if the property does not yet exist,
// it is first set to the empty array.
//
// Equivalent numbers of different types (e.g. 3L and 3.0) are
// considered equal when checking if a value is missing.
// NaN is equal to NaN, and the null value is equal to the null value.
// If the input contains multiple equivalent values, only the first will
// be considered.
//
// The corresponding transform result will be the null value.
AppendMissingElements *ArrayValue `protobuf:"bytes,6,opt,name=append_missing_elements,json=appendMissingElements,proto3,oneof"`
}PropertyTransform_Increment
type PropertyTransform_Increment struct {
// Adds the given value to the property's current value.
//
// This must be an integer or a double value.
// If the property is not an integer or double, or if the property does not
// yet exist, the transformation will set the property to the given value.
// If either of the given value or the current property value are doubles,
// both values will be interpreted as doubles. Double arithmetic and
// representation of double values follows IEEE 754 semantics.
// If there is positive/negative integer overflow, the property is resolved
// to the largest magnitude positive/negative integer.
Increment *Value `protobuf:"bytes,3,opt,name=increment,proto3,oneof"`
}PropertyTransform_Maximum
type PropertyTransform_Maximum struct {
// Sets the property to the maximum of its current value and the given
// value.
//
// This must be an integer or a double value.
// If the property is not an integer or double, or if the property does not
// yet exist, the transformation will set the property to the given value.
// If a maximum operation is applied where the property and the input value
// are of mixed types (that is - one is an integer and one is a double)
// the property takes on the type of the larger operand. If the operands are
// equivalent (e.g. 3 and 3.0), the property does not change.
// 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
// zero input value is always the stored value.
// The maximum of any numeric value x and NaN is NaN.
Maximum *Value `protobuf:"bytes,4,opt,name=maximum,proto3,oneof"`
}PropertyTransform_Minimum
type PropertyTransform_Minimum struct {
// Sets the property to the minimum of its current value and the given
// value.
//
// This must be an integer or a double value.
// If the property is not an integer or double, or if the property does not
// yet exist, the transformation will set the property to the input value.
// If a minimum operation is applied where the property and the input value
// are of mixed types (that is - one is an integer and one is a double)
// the property takes on the type of the smaller operand. If the operands
// are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
// and -0.0 are all zero. The minimum of a zero stored value and zero input
// value is always the stored value. The minimum of any numeric value x and
// NaN is NaN.
Minimum *Value `protobuf:"bytes,5,opt,name=minimum,proto3,oneof"`
}PropertyTransform_RemoveAllFromArray
type PropertyTransform_RemoveAllFromArray struct {
// Removes all of the given elements from the array in the property.
// If the property is not an array, or if the property does not yet exist,
// it is set to the empty array.
//
// Equivalent numbers of different types (e.g. 3L and 3.0) are
// considered equal when deciding whether an element should be removed.
// NaN is equal to NaN, and the null value is equal to the null value.
// This will remove all equivalent values if there are duplicates.
//
// The corresponding transform result will be the null value.
RemoveAllFromArray *ArrayValue `protobuf:"bytes,7,opt,name=remove_all_from_array,json=removeAllFromArray,proto3,oneof"`
}PropertyTransform_ServerValue
type PropertyTransform_ServerValue int32A value that is calculated by the server.
PropertyTransform_SERVER_VALUE_UNSPECIFIED, PropertyTransform_REQUEST_TIME
const (
// Unspecified. This value must not be used.
PropertyTransform_SERVER_VALUE_UNSPECIFIED PropertyTransform_ServerValue = 0
// The time at which the server processed the request, with millisecond
// precision. If used on multiple properties (same or different entities)
// in a transaction, all the properties will get the same server timestamp.
PropertyTransform_REQUEST_TIME PropertyTransform_ServerValue = 1
)func (PropertyTransform_ServerValue) Descriptor
func (PropertyTransform_ServerValue) Descriptor() protoreflect.EnumDescriptorfunc (PropertyTransform_ServerValue) Enum
func (x PropertyTransform_ServerValue) Enum() *PropertyTransform_ServerValuefunc (PropertyTransform_ServerValue) EnumDescriptor
func (PropertyTransform_ServerValue) EnumDescriptor() ([]byte, []int)Deprecated: Use PropertyTransform_ServerValue.Descriptor instead.
func (PropertyTransform_ServerValue) Number
func (x PropertyTransform_ServerValue) Number() protoreflect.EnumNumberfunc (PropertyTransform_ServerValue) String
func (x PropertyTransform_ServerValue) String() stringfunc (PropertyTransform_ServerValue) Type
func (PropertyTransform_ServerValue) Type() protoreflect.EnumTypePropertyTransform_SetToServerValue
type PropertyTransform_SetToServerValue struct {
// Sets the property to the given server value.
SetToServerValue PropertyTransform_ServerValue `protobuf:"varint,2,opt,name=set_to_server_value,json=setToServerValue,proto3,enum=google.datastore.v1.PropertyTransform_ServerValue,oneof"`
}Query
type Query struct {
// The projection to return. Defaults to returning all properties.
Projection []*Projection `protobuf:"bytes,2,rep,name=projection,proto3" json:"projection,omitempty"`
// The kinds to query (if empty, returns entities of all kinds).
// Currently at most 1 kind may be specified.
Kind []*KindExpression `protobuf:"bytes,3,rep,name=kind,proto3" json:"kind,omitempty"`
// The filter to apply.
Filter *Filter `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
// The order to apply to the query results (if empty, order is unspecified).
Order []*PropertyOrder `protobuf:"bytes,5,rep,name=order,proto3" json:"order,omitempty"`
// 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).
//
// Requires:
//
// * If `order` is specified, the set of distinct on properties must appear
// before the non-distinct on properties in `order`.
DistinctOn []*PropertyReference `protobuf:"bytes,6,rep,name=distinct_on,json=distinctOn,proto3" json:"distinct_on,omitempty"`
// 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](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
StartCursor []byte `protobuf:"bytes,7,opt,name=start_cursor,json=startCursor,proto3" json:"start_cursor,omitempty"`
// 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](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
EndCursor []byte `protobuf:"bytes,8,opt,name=end_cursor,json=endCursor,proto3" json:"end_cursor,omitempty"`
// The number of results to skip. Applies before limit, but after all other
// constraints. Optional. Must be >= 0 if specified.
Offset int32 `protobuf:"varint,10,opt,name=offset,proto3" json:"offset,omitempty"`
// The maximum number of results to return. Applies after all other
// constraints. Optional.
// Unspecified is interpreted as no limit.
// Must be >= 0 if specified.
Limit *wrapperspb.Int32Value `protobuf:"bytes,12,opt,name=limit,proto3" json:"limit,omitempty"`
// Optional. A potential Nearest Neighbors Search.
//
// Applies after all other filters and ordering.
//
// Finds the closest vector embeddings to the given query vector.
FindNearest *FindNearest `protobuf:"bytes,13,opt,name=find_nearest,json=findNearest,proto3" json:"find_nearest,omitempty"`
// contains filtered or unexported fields
}A query for entities.
The query stages are executed in the following order:
- kind
- filter
- projection
- order + start_cursor + end_cursor
- offset
- limit
- find_nearest
func (*Query) Descriptor
Deprecated: Use Query.ProtoReflect.Descriptor instead.
func (*Query) GetDistinctOn
func (x *Query) GetDistinctOn() []*PropertyReferencefunc (*Query) GetEndCursor
func (*Query) GetFilter
func (*Query) GetFindNearest
func (x *Query) GetFindNearest() *FindNearestfunc (*Query) GetKind
func (x *Query) GetKind() []*KindExpressionfunc (*Query) GetLimit
func (x *Query) GetLimit() *wrapperspb.Int32Valuefunc (*Query) GetOffset
func (*Query) GetOrder
func (x *Query) GetOrder() []*PropertyOrderfunc (*Query) GetProjection
func (x *Query) GetProjection() []*Projectionfunc (*Query) GetStartCursor
func (*Query) ProtoMessage
func (*Query) ProtoMessage()func (*Query) ProtoReflect
func (x *Query) ProtoReflect() protoreflect.Messagefunc (*Query) Reset
func (x *Query) Reset()func (*Query) String
QueryResultBatch
type QueryResultBatch struct {
// The number of results skipped, typically because of an offset.
SkippedResults int32 `protobuf:"varint,6,opt,name=skipped_results,json=skippedResults,proto3" json:"skipped_results,omitempty"`
// A cursor that points to the position after the last skipped result.
// Will be set when `skipped_results` != 0.
SkippedCursor []byte `protobuf:"bytes,3,opt,name=skipped_cursor,json=skippedCursor,proto3" json:"skipped_cursor,omitempty"`
// The result type for every entity in `entity_results`.
EntityResultType EntityResult_ResultType `protobuf:"varint,1,opt,name=entity_result_type,json=entityResultType,proto3,enum=google.datastore.v1.EntityResult_ResultType" json:"entity_result_type,omitempty"`
// The results for this batch.
EntityResults []*EntityResult `protobuf:"bytes,2,rep,name=entity_results,json=entityResults,proto3" json:"entity_results,omitempty"`
// A cursor that points to the position after the last result in the batch.
EndCursor []byte `protobuf:"bytes,4,opt,name=end_cursor,json=endCursor,proto3" json:"end_cursor,omitempty"`
// The state of the query after the current batch.
MoreResults QueryResultBatch_MoreResultsType `protobuf:"varint,5,opt,name=more_results,json=moreResults,proto3,enum=google.datastore.v1.QueryResultBatch_MoreResultsType" json:"more_results,omitempty"`
// 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.
SnapshotVersion int64 `protobuf:"varint,7,opt,name=snapshot_version,json=snapshotVersion,proto3" json:"snapshot_version,omitempty"`
// Read timestamp 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 timestamp. Each batch's read timestamp
// is valid for all preceding batches.
// This value will not be set for eventually consistent queries in Cloud
// Datastore.
ReadTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
// contains filtered or unexported fields
}A batch of results produced by a query.
func (*QueryResultBatch) Descriptor
func (*QueryResultBatch) Descriptor() ([]byte, []int)Deprecated: Use QueryResultBatch.ProtoReflect.Descriptor instead.
func (*QueryResultBatch) GetEndCursor
func (x *QueryResultBatch) GetEndCursor() []bytefunc (*QueryResultBatch) GetEntityResultType
func (x *QueryResultBatch) GetEntityResultType() EntityResult_ResultTypefunc (*QueryResultBatch) GetEntityResults
func (x *QueryResultBatch) GetEntityResults() []*EntityResultfunc (*QueryResultBatch) GetMoreResults
func (x *QueryResultBatch) GetMoreResults() QueryResultBatch_MoreResultsTypefunc (*QueryResultBatch) GetReadTime
func (x *QueryResultBatch) GetReadTime() *timestamppb.Timestampfunc (*QueryResultBatch) GetSkippedCursor
func (x *QueryResultBatch) GetSkippedCursor() []bytefunc (*QueryResultBatch) GetSkippedResults
func (x *QueryResultBatch) GetSkippedResults() int32func (*QueryResultBatch) GetSnapshotVersion
func (x *QueryResultBatch) GetSnapshotVersion() int64func (*QueryResultBatch) ProtoMessage
func (*QueryResultBatch) ProtoMessage()func (*QueryResultBatch) ProtoReflect
func (x *QueryResultBatch) ProtoReflect() protoreflect.Messagefunc (*QueryResultBatch) Reset
func (x *QueryResultBatch) Reset()func (*QueryResultBatch) String
func (x *QueryResultBatch) String() stringQueryResultBatch_MoreResultsType
type QueryResultBatch_MoreResultsType int32The possible values for the more_results field.
QueryResultBatch_MORE_RESULTS_TYPE_UNSPECIFIED, QueryResultBatch_NOT_FINISHED, QueryResultBatch_MORE_RESULTS_AFTER_LIMIT, QueryResultBatch_MORE_RESULTS_AFTER_CURSOR, QueryResultBatch_NO_MORE_RESULTS
const (
// Unspecified. This value is never used.
QueryResultBatch_MORE_RESULTS_TYPE_UNSPECIFIED QueryResultBatch_MoreResultsType = 0
// There may be additional batches to fetch from this query.
QueryResultBatch_NOT_FINISHED QueryResultBatch_MoreResultsType = 1
// The query is finished, but there may be more results after the limit.
QueryResultBatch_MORE_RESULTS_AFTER_LIMIT QueryResultBatch_MoreResultsType = 2
// The query is finished, but there may be more results after the end
// cursor.
QueryResultBatch_MORE_RESULTS_AFTER_CURSOR QueryResultBatch_MoreResultsType = 4
// The query is finished, and there are no more results.
QueryResultBatch_NO_MORE_RESULTS QueryResultBatch_MoreResultsType = 3
)func (QueryResultBatch_MoreResultsType) Descriptor
func (QueryResultBatch_MoreResultsType) Descriptor() protoreflect.EnumDescriptorfunc (QueryResultBatch_MoreResultsType) Enum
func (x QueryResultBatch_MoreResultsType) Enum() *QueryResultBatch_MoreResultsTypefunc (QueryResultBatch_MoreResultsType) EnumDescriptor
func (QueryResultBatch_MoreResultsType) EnumDescriptor() ([]byte, []int)Deprecated: Use QueryResultBatch_MoreResultsType.Descriptor instead.
func (QueryResultBatch_MoreResultsType) Number
func (x QueryResultBatch_MoreResultsType) Number() protoreflect.EnumNumberfunc (QueryResultBatch_MoreResultsType) String
func (x QueryResultBatch_MoreResultsType) String() stringfunc (QueryResultBatch_MoreResultsType) Type
func (QueryResultBatch_MoreResultsType) Type() protoreflect.EnumTypeReadOptions
type ReadOptions struct {
// For Cloud Firestore in Datastore mode, if you don't specify
// read_consistency then all lookups and queries default to
// `read_consistency`=`STRONG`. Note that, in Cloud Datastore, global queries
// defaulted to `read_consistency`=`EVENTUAL`.
//
// Explicitly setting `read_consistency`=`EVENTUAL` will result in eventually
// consistent lookups and queries.
//
// Types that are assignable to ConsistencyType:
//
// *ReadOptions_ReadConsistency_
// *ReadOptions_Transaction
// *ReadOptions_NewTransaction
// *ReadOptions_ReadTime
ConsistencyType isReadOptions_ConsistencyType `protobuf_oneof:"consistency_type"`
// contains filtered or unexported fields
}The options shared by read requests.
func (*ReadOptions) Descriptor
func (*ReadOptions) Descriptor() ([]byte, []int)Deprecated: Use ReadOptions.ProtoReflect.Descriptor instead.
func (*ReadOptions) GetConsistencyType
func (m *ReadOptions) GetConsistencyType() isReadOptions_ConsistencyTypefunc (*ReadOptions) GetNewTransaction
func (x *ReadOptions) GetNewTransaction() *TransactionOptionsfunc (*ReadOptions) GetReadConsistency
func (x *ReadOptions) GetReadConsistency() ReadOptions_ReadConsistencyfunc (*ReadOptions) GetReadTime
func (x *ReadOptions) GetReadTime() *timestamppb.Timestampfunc (*ReadOptions) GetTransaction
func (x *ReadOptions) GetTransaction() []bytefunc (*ReadOptions) ProtoMessage
func (*ReadOptions) ProtoMessage()func (*ReadOptions) ProtoReflect
func (x *ReadOptions) ProtoReflect() protoreflect.Messagefunc (*ReadOptions) Reset
func (x *ReadOptions) Reset()func (*ReadOptions) String
func (x *ReadOptions) String() stringReadOptions_NewTransaction
type ReadOptions_NewTransaction struct {
// Options for beginning a new transaction for this request.
//
// The new transaction identifier will be returned in the corresponding
// response as either
// [LookupResponse.transaction][google.datastore.v1.LookupResponse.transaction]
// or
// [RunQueryResponse.transaction][google.datastore.v1.RunQueryResponse.transaction].
NewTransaction *TransactionOptions `protobuf:"bytes,3,opt,name=new_transaction,json=newTransaction,proto3,oneof"`
}ReadOptions_ReadConsistency
type ReadOptions_ReadConsistency int32The possible values for read consistencies.
ReadOptions_READ_CONSISTENCY_UNSPECIFIED, ReadOptions_STRONG, ReadOptions_EVENTUAL
const (
// Unspecified. This value must not be used.
ReadOptions_READ_CONSISTENCY_UNSPECIFIED ReadOptions_ReadConsistency = 0
// Strong consistency.
ReadOptions_STRONG ReadOptions_ReadConsistency = 1
// Eventual consistency.
ReadOptions_EVENTUAL ReadOptions_ReadConsistency = 2
)func (ReadOptions_ReadConsistency) Descriptor
func (ReadOptions_ReadConsistency) Descriptor() protoreflect.EnumDescriptorfunc (ReadOptions_ReadConsistency) Enum
func (x ReadOptions_ReadConsistency) Enum() *ReadOptions_ReadConsistencyfunc (ReadOptions_ReadConsistency) EnumDescriptor
func (ReadOptions_ReadConsistency) EnumDescriptor() ([]byte, []int)Deprecated: Use ReadOptions_ReadConsistency.Descriptor instead.
func (ReadOptions_ReadConsistency) Number
func (x ReadOptions_ReadConsistency) Number() protoreflect.EnumNumberfunc (ReadOptions_ReadConsistency) String
func (x ReadOptions_ReadConsistency) String() stringfunc (ReadOptions_ReadConsistency) Type
func (ReadOptions_ReadConsistency) Type() protoreflect.EnumTypeReadOptions_ReadConsistency_
type ReadOptions_ReadConsistency_ struct {
// The non-transactional read consistency to use.
ReadConsistency ReadOptions_ReadConsistency `protobuf:"varint,1,opt,name=read_consistency,json=readConsistency,proto3,enum=google.datastore.v1.ReadOptions_ReadConsistency,oneof"`
}ReadOptions_ReadTime
type ReadOptions_ReadTime struct {
// Reads entities as they were at the given time. This value is only
// supported for Cloud Firestore in Datastore mode.
//
// This must be a microsecond precision timestamp within the past one hour,
// or if Point-in-Time Recovery is enabled, can additionally be a whole
// minute timestamp within the past 7 days.
ReadTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=read_time,json=readTime,proto3,oneof"`
}ReadOptions_Transaction
type ReadOptions_Transaction struct {
// The identifier of the transaction in which to read. A
// transaction identifier is returned by a call to
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
Transaction []byte `protobuf:"bytes,2,opt,name=transaction,proto3,oneof"`
}ReserveIdsRequest
type ReserveIdsRequest struct {
// Required. The ID of the project against which to make the request.
ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string ” to refer the default
// database.
DatabaseId string `protobuf:"bytes,9,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"`
// Required. A list of keys with complete key paths whose numeric IDs should
// not be auto-allocated.
Keys []*Key `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
// contains filtered or unexported fields
}The request for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
func (*ReserveIdsRequest) Descriptor
func (*ReserveIdsRequest) Descriptor() ([]byte, []int)Deprecated: Use ReserveIdsRequest.ProtoReflect.Descriptor instead.
func (*ReserveIdsRequest) GetDatabaseId
func (x *ReserveIdsRequest) GetDatabaseId() stringfunc (*ReserveIdsRequest) GetKeys
func (x *ReserveIdsRequest) GetKeys() []*Keyfunc (*ReserveIdsRequest) GetProjectId
func (x *ReserveIdsRequest) GetProjectId() stringfunc (*ReserveIdsRequest) ProtoMessage
func (*ReserveIdsRequest) ProtoMessage()func (*ReserveIdsRequest) ProtoReflect
func (x *ReserveIdsRequest) ProtoReflect() protoreflect.Messagefunc (*ReserveIdsRequest) Reset
func (x *ReserveIdsRequest) Reset()func (*ReserveIdsRequest) String
func (x *ReserveIdsRequest) String() stringReserveIdsResponse
type ReserveIdsResponse struct {
// contains filtered or unexported fields
}The response for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
func (*ReserveIdsResponse) Descriptor
func (*ReserveIdsResponse) Descriptor() ([]byte, []int)Deprecated: Use ReserveIdsResponse.ProtoReflect.Descriptor instead.
func (*ReserveIdsResponse) ProtoMessage
func (*ReserveIdsResponse) ProtoMessage()func (*ReserveIdsResponse) ProtoReflect
func (x *ReserveIdsResponse) ProtoReflect() protoreflect.Messagefunc (*ReserveIdsResponse) Reset
func (x *ReserveIdsResponse) Reset()func (*ReserveIdsResponse) String
func (x *ReserveIdsResponse) String() stringRollbackRequest
type RollbackRequest struct {
// Required. The ID of the project against which to make the request.
ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string ” to refer the default
// database.
DatabaseId string `protobuf:"bytes,9,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"`
// Required. The transaction identifier, returned by a call to
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
// contains filtered or unexported fields
}The request for [Datastore.Rollback][google.datastore.v1.Datastore.Rollback].
func (*RollbackRequest) Descriptor
func (*RollbackRequest) Descriptor() ([]byte, []int)Deprecated: Use RollbackRequest.ProtoReflect.Descriptor instead.
func (*RollbackRequest) GetDatabaseId
func (x *RollbackRequest) GetDatabaseId() stringfunc (*RollbackRequest) GetProjectId
func (x *RollbackRequest) GetProjectId() stringfunc (*RollbackRequest) GetTransaction
func (x *RollbackRequest) GetTransaction() []bytefunc (*RollbackRequest) ProtoMessage
func (*RollbackRequest) ProtoMessage()func (*RollbackRequest) ProtoReflect
func (x *RollbackRequest) ProtoReflect() protoreflect.Messagefunc (*RollbackRequest) Reset
func (x *RollbackRequest) Reset()func (*RollbackRequest) String
func (x *RollbackRequest) String() stringRollbackResponse
type RollbackResponse struct {
// contains filtered or unexported fields
}The response for [Datastore.Rollback][google.datastore.v1.Datastore.Rollback]. (an empty message).
func (*RollbackResponse) Descriptor
func (*RollbackResponse) Descriptor() ([]byte, []int)Deprecated: Use RollbackResponse.ProtoReflect.Descriptor instead.
func (*RollbackResponse) ProtoMessage
func (*RollbackResponse) ProtoMessage()func (*RollbackResponse) ProtoReflect
func (x *RollbackResponse) ProtoReflect() protoreflect.Messagefunc (*RollbackResponse) Reset
func (x *RollbackResponse) Reset()func (*RollbackResponse) String
func (x *RollbackResponse) String() stringRunAggregationQueryRequest
type RunAggregationQueryRequest struct {
// Required. The ID of the project against which to make the request.
ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string ” to refer the default
// database.
DatabaseId string `protobuf:"bytes,9,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"`
// 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.
PartitionId *PartitionId `protobuf:"bytes,2,opt,name=partition_id,json=partitionId,proto3" json:"partition_id,omitempty"`
// The options for this query.
ReadOptions *ReadOptions `protobuf:"bytes,1,opt,name=read_options,json=readOptions,proto3" json:"read_options,omitempty"`
// The type of query.
//
// Types that are assignable to QueryType:
//
// *RunAggregationQueryRequest_AggregationQuery
// *RunAggregationQueryRequest_GqlQuery
QueryType isRunAggregationQueryRequest_QueryType `protobuf_oneof:"query_type"`
// Optional. Explain options for the query. If set, additional query
// statistics will be returned. If not, only query results will be returned.
ExplainOptions *ExplainOptions `protobuf:"bytes,11,opt,name=explain_options,json=explainOptions,proto3" json:"explain_options,omitempty"`
// contains filtered or unexported fields
}The request for [Datastore.RunAggregationQuery][google.datastore.v1.Datastore.RunAggregationQuery].
func (*RunAggregationQueryRequest) Descriptor
func (*RunAggregationQueryRequest) Descriptor() ([]byte, []int)Deprecated: Use RunAggregationQueryRequest.ProtoReflect.Descriptor instead.
func (*RunAggregationQueryRequest) GetAggregationQuery
func (x *RunAggregationQueryRequest) GetAggregationQuery() *AggregationQueryfunc (*RunAggregationQueryRequest) GetDatabaseId
func (x *RunAggregationQueryRequest) GetDatabaseId() stringfunc (*RunAggregationQueryRequest) GetExplainOptions
func (x *RunAggregationQueryRequest) GetExplainOptions() *ExplainOptionsfunc (*RunAggregationQueryRequest) GetGqlQuery
func (x *RunAggregationQueryRequest) GetGqlQuery() *GqlQueryfunc (*RunAggregationQueryRequest) GetPartitionId
func (x *RunAggregationQueryRequest) GetPartitionId() *PartitionIdfunc (*RunAggregationQueryRequest) GetProjectId
func (x *RunAggregationQueryRequest) GetProjectId() stringfunc (*RunAggregationQueryRequest) GetQueryType
func (m *RunAggregationQueryRequest) GetQueryType() isRunAggregationQueryRequest_QueryTypefunc (*RunAggregationQueryRequest) GetReadOptions
func (x *RunAggregationQueryRequest) GetReadOptions() *ReadOptionsfunc (*RunAggregationQueryRequest) ProtoMessage
func (*RunAggregationQueryRequest) ProtoMessage()func (*RunAggregationQueryRequest) ProtoReflect
func (x *RunAggregationQueryRequest) ProtoReflect() protoreflect.Messagefunc (*RunAggregationQueryRequest) Reset
func (x *RunAggregationQueryRequest) Reset()func (*RunAggregationQueryRequest) String
func (x *RunAggregationQueryRequest) String() stringRunAggregationQueryRequest_AggregationQuery
type RunAggregationQueryRequest_AggregationQuery struct {
// The query to run.
AggregationQuery *AggregationQuery `protobuf:"bytes,3,opt,name=aggregation_query,json=aggregationQuery,proto3,oneof"`
}RunAggregationQueryRequest_GqlQuery
type RunAggregationQueryRequest_GqlQuery struct {
// The GQL query to run. This query must be an aggregation query.
GqlQuery *GqlQuery `protobuf:"bytes,7,opt,name=gql_query,json=gqlQuery,proto3,oneof"`
}RunAggregationQueryResponse
type RunAggregationQueryResponse struct {
// A batch of aggregation results. Always present.
Batch *AggregationResultBatch `protobuf:"bytes,1,opt,name=batch,proto3" json:"batch,omitempty"`
// The parsed form of the `GqlQuery` from the request, if it was set.
Query *AggregationQuery `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
// The identifier of the transaction that was started as part of this
// RunAggregationQuery request.
//
// Set only when
// [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction]
// was set in
// [RunAggregationQueryRequest.read_options][google.datastore.v1.RunAggregationQueryRequest.read_options].
Transaction []byte `protobuf:"bytes,5,opt,name=transaction,proto3" json:"transaction,omitempty"`
// Query explain metrics. This is only present when the
// [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options]
// is provided, and it is sent only once with the last response in the stream.
ExplainMetrics *ExplainMetrics `protobuf:"bytes,9,opt,name=explain_metrics,json=explainMetrics,proto3" json:"explain_metrics,omitempty"`
// contains filtered or unexported fields
}The response for [Datastore.RunAggregationQuery][google.datastore.v1.Datastore.RunAggregationQuery].
func (*RunAggregationQueryResponse) Descriptor
func (*RunAggregationQueryResponse) Descriptor() ([]byte, []int)Deprecated: Use RunAggregationQueryResponse.ProtoReflect.Descriptor instead.
func (*RunAggregationQueryResponse) GetBatch
func (x *RunAggregationQueryResponse) GetBatch() *AggregationResultBatchfunc (*RunAggregationQueryResponse) GetExplainMetrics
func (x *RunAggregationQueryResponse) GetExplainMetrics() *ExplainMetricsfunc (*RunAggregationQueryResponse) GetQuery
func (x *RunAggregationQueryResponse) GetQuery() *AggregationQueryfunc (*RunAggregationQueryResponse) GetTransaction
func (x *RunAggregationQueryResponse) GetTransaction() []bytefunc (*RunAggregationQueryResponse) ProtoMessage
func (*RunAggregationQueryResponse) ProtoMessage()func (*RunAggregationQueryResponse) ProtoReflect
func (x *RunAggregationQueryResponse) ProtoReflect() protoreflect.Messagefunc (*RunAggregationQueryResponse) Reset
func (x *RunAggregationQueryResponse) Reset()func (*RunAggregationQueryResponse) String
func (x *RunAggregationQueryResponse) String() stringRunQueryRequest
type RunQueryRequest struct {
// Required. The ID of the project against which to make the request.
ProjectId string `protobuf:"bytes,8,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
// The ID of the database against which to make the request.
//
// '(default)' is not allowed; please use empty string ” to refer the default
// database.
DatabaseId string `protobuf:"bytes,9,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"`
// 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.
PartitionId *PartitionId `protobuf:"bytes,2,opt,name=partition_id,json=partitionId,proto3" json:"partition_id,omitempty"`
// The options for this query.
ReadOptions *ReadOptions `protobuf:"bytes,1,opt,name=read_options,json=readOptions,proto3" json:"read_options,omitempty"`
// The type of query.
//
// Types that are assignable to QueryType:
//
// *RunQueryRequest_Query
// *RunQueryRequest_GqlQuery
QueryType isRunQueryRequest_QueryType `protobuf_oneof:"query_type"`
// The properties to return.
// This field must not be set for a projection query.
//
// See
// [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
PropertyMask *PropertyMask `protobuf:"bytes,10,opt,name=property_mask,json=propertyMask,proto3" json:"property_mask,omitempty"`
// Optional. Explain options for the query. If set, additional query
// statistics will be returned. If not, only query results will be returned.
ExplainOptions *ExplainOptions `protobuf:"bytes,12,opt,name=explain_options,json=explainOptions,proto3" json:"explain_options,omitempty"`
// contains filtered or unexported fields
}The request for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
func (*RunQueryRequest) Descriptor
func (*RunQueryRequest) Descriptor() ([]byte, []int)Deprecated: Use RunQueryRequest.ProtoReflect.Descriptor instead.
func (*RunQueryRequest) GetDatabaseId
func (x *RunQueryRequest) GetDatabaseId() stringfunc (*RunQueryRequest) GetExplainOptions
func (x *RunQueryRequest) GetExplainOptions() *ExplainOptionsfunc (*RunQueryRequest) GetGqlQuery
func (x *RunQueryRequest) GetGqlQuery() *GqlQueryfunc (*RunQueryRequest) GetPartitionId
func (x *RunQueryRequest) GetPartitionId() *PartitionIdfunc (*RunQueryRequest) GetProjectId
func (x *RunQueryRequest) GetProjectId() stringfunc (*RunQueryRequest) GetPropertyMask
func (x *RunQueryRequest) GetPropertyMask() *PropertyMaskfunc (*RunQueryRequest) GetQuery
func (x *RunQueryRequest) GetQuery() *Queryfunc (*RunQueryRequest) GetQueryType
func (m *RunQueryRequest) GetQueryType() isRunQueryRequest_QueryTypefunc (*RunQueryRequest) GetReadOptions
func (x *RunQueryRequest) GetReadOptions() *ReadOptionsfunc (*RunQueryRequest) ProtoMessage
func (*RunQueryRequest) ProtoMessage()func (*RunQueryRequest) ProtoReflect
func (x *RunQueryRequest) ProtoReflect() protoreflect.Messagefunc (*RunQueryRequest) Reset
func (x *RunQueryRequest) Reset()func (*RunQueryRequest) String
func (x *RunQueryRequest) String() stringRunQueryRequest_GqlQuery
type RunQueryRequest_GqlQuery struct {
// The GQL query to run. This query must be a non-aggregation query.
GqlQuery *GqlQuery `protobuf:"bytes,7,opt,name=gql_query,json=gqlQuery,proto3,oneof"`
}RunQueryRequest_Query
type RunQueryRequest_Query struct {
// The query to run.
Query *Query `protobuf:"bytes,3,opt,name=query,proto3,oneof"`
}RunQueryResponse
type RunQueryResponse struct {
// A batch of query results (always present).
Batch *QueryResultBatch `protobuf:"bytes,1,opt,name=batch,proto3" json:"batch,omitempty"`
// The parsed form of the `GqlQuery` from the request, if it was set.
Query *Query `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
// The identifier of the transaction that was started as part of this
// RunQuery request.
//
// Set only when
// [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction]
// was set in
// [RunQueryRequest.read_options][google.datastore.v1.RunQueryRequest.read_options].
Transaction []byte `protobuf:"bytes,5,opt,name=transaction,proto3" json:"transaction,omitempty"`
// Query explain metrics. This is only present when the
// [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options]
// is provided, and it is sent only once with the last response in the stream.
ExplainMetrics *ExplainMetrics `protobuf:"bytes,9,opt,name=explain_metrics,json=explainMetrics,proto3" json:"explain_metrics,omitempty"`
// contains filtered or unexported fields
}The response for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
func (*RunQueryResponse) Descriptor
func (*RunQueryResponse) Descriptor() ([]byte, []int)Deprecated: Use RunQueryResponse.ProtoReflect.Descriptor instead.
func (*RunQueryResponse) GetBatch
func (x *RunQueryResponse) GetBatch() *QueryResultBatchfunc (*RunQueryResponse) GetExplainMetrics
func (x *RunQueryResponse) GetExplainMetrics() *ExplainMetricsfunc (*RunQueryResponse) GetQuery
func (x *RunQueryResponse) GetQuery() *Queryfunc (*RunQueryResponse) GetTransaction
func (x *RunQueryResponse) GetTransaction() []bytefunc (*RunQueryResponse) ProtoMessage
func (*RunQueryResponse) ProtoMessage()func (*RunQueryResponse) ProtoReflect
func (x *RunQueryResponse) ProtoReflect() protoreflect.Messagefunc (*RunQueryResponse) Reset
func (x *RunQueryResponse) Reset()func (*RunQueryResponse) String
func (x *RunQueryResponse) String() stringTransactionOptions
type TransactionOptions struct {
// The `mode` of the transaction, indicating whether write operations are
// supported.
//
// Types that are assignable to Mode:
//
// *TransactionOptions_ReadWrite_
// *TransactionOptions_ReadOnly_
Mode isTransactionOptions_Mode `protobuf_oneof:"mode"`
// contains filtered or unexported fields
}Options for beginning a new transaction.
Transactions can be created explicitly with calls to [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction] or implicitly by setting [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction] in read requests.
func (*TransactionOptions) Descriptor
func (*TransactionOptions) Descriptor() ([]byte, []int)Deprecated: Use TransactionOptions.ProtoReflect.Descriptor instead.
func (*TransactionOptions) GetMode
func (m *TransactionOptions) GetMode() isTransactionOptions_Modefunc (*TransactionOptions) GetReadOnly
func (x *TransactionOptions) GetReadOnly() *TransactionOptions_ReadOnlyfunc (*TransactionOptions) GetReadWrite
func (x *TransactionOptions) GetReadWrite() *TransactionOptions_ReadWritefunc (*TransactionOptions) ProtoMessage
func (*TransactionOptions) ProtoMessage()func (*TransactionOptions) ProtoReflect
func (x *TransactionOptions) ProtoReflect() protoreflect.Messagefunc (*TransactionOptions) Reset
func (x *TransactionOptions) Reset()func (*TransactionOptions) String
func (x *TransactionOptions) String() stringTransactionOptions_ReadOnly
type TransactionOptions_ReadOnly struct {
// Reads entities at the given time.
//
// This must be a microsecond precision timestamp within the past one hour,
// or if Point-in-Time Recovery is enabled, can additionally be a whole
// minute timestamp within the past 7 days.
ReadTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
// contains filtered or unexported fields
}Options specific to read-only transactions.
func (*TransactionOptions_ReadOnly) Descriptor
func (*TransactionOptions_ReadOnly) Descriptor() ([]byte, []int)Deprecated: Use TransactionOptions_ReadOnly.ProtoReflect.Descriptor instead.
func (*TransactionOptions_ReadOnly) GetReadTime
func (x *TransactionOptions_ReadOnly) GetReadTime() *timestamppb.Timestampfunc (*TransactionOptions_ReadOnly) ProtoMessage
func (*TransactionOptions_ReadOnly) ProtoMessage()func (*TransactionOptions_ReadOnly) ProtoReflect
func (x *TransactionOptions_ReadOnly) ProtoReflect() protoreflect.Messagefunc (*TransactionOptions_ReadOnly) Reset
func (x *TransactionOptions_ReadOnly) Reset()func (*TransactionOptions_ReadOnly) String
func (x *TransactionOptions_ReadOnly) String() stringTransactionOptions_ReadOnly_
type TransactionOptions_ReadOnly_ struct {
// The transaction should only allow reads.
ReadOnly *TransactionOptions_ReadOnly `protobuf:"bytes,2,opt,name=read_only,json=readOnly,proto3,oneof"`
}TransactionOptions_ReadWrite
type TransactionOptions_ReadWrite struct {
// The transaction identifier of the transaction being retried.
PreviousTransaction []byte `protobuf:"bytes,1,opt,name=previous_transaction,json=previousTransaction,proto3" json:"previous_transaction,omitempty"`
// contains filtered or unexported fields
}Options specific to read / write transactions.
func (*TransactionOptions_ReadWrite) Descriptor
func (*TransactionOptions_ReadWrite) Descriptor() ([]byte, []int)Deprecated: Use TransactionOptions_ReadWrite.ProtoReflect.Descriptor instead.
func (*TransactionOptions_ReadWrite) GetPreviousTransaction
func (x *TransactionOptions_ReadWrite) GetPreviousTransaction() []bytefunc (*TransactionOptions_ReadWrite) ProtoMessage
func (*TransactionOptions_ReadWrite) ProtoMessage()func (*TransactionOptions_ReadWrite) ProtoReflect
func (x *TransactionOptions_ReadWrite) ProtoReflect() protoreflect.Messagefunc (*TransactionOptions_ReadWrite) Reset
func (x *TransactionOptions_ReadWrite) Reset()func (*TransactionOptions_ReadWrite) String
func (x *TransactionOptions_ReadWrite) String() stringTransactionOptions_ReadWrite_
type TransactionOptions_ReadWrite_ struct {
// The transaction should allow both reads and writes.
ReadWrite *TransactionOptions_ReadWrite `protobuf:"bytes,1,opt,name=read_write,json=readWrite,proto3,oneof"`
}UnimplementedDatastoreServer
type UnimplementedDatastoreServer struct {
}UnimplementedDatastoreServer should be embedded to have forward compatible implementations.
func (UnimplementedDatastoreServer) AllocateIds
func (UnimplementedDatastoreServer) AllocateIds(context.Context, *AllocateIdsRequest) (*AllocateIdsResponse, error)func (UnimplementedDatastoreServer) BeginTransaction
func (UnimplementedDatastoreServer) BeginTransaction(context.Context, *BeginTransactionRequest) (*BeginTransactionResponse, error)func (UnimplementedDatastoreServer) Commit
func (UnimplementedDatastoreServer) Commit(context.Context, *CommitRequest) (*CommitResponse, error)func (UnimplementedDatastoreServer) Lookup
func (UnimplementedDatastoreServer) Lookup(context.Context, *LookupRequest) (*LookupResponse, error)func (UnimplementedDatastoreServer) ReserveIds
func (UnimplementedDatastoreServer) ReserveIds(context.Context, *ReserveIdsRequest) (*ReserveIdsResponse, error)func (UnimplementedDatastoreServer) Rollback
func (UnimplementedDatastoreServer) Rollback(context.Context, *RollbackRequest) (*RollbackResponse, error)func (UnimplementedDatastoreServer) RunAggregationQuery
func (UnimplementedDatastoreServer) RunAggregationQuery(context.Context, *RunAggregationQueryRequest) (*RunAggregationQueryResponse, error)func (UnimplementedDatastoreServer) RunQuery
func (UnimplementedDatastoreServer) RunQuery(context.Context, *RunQueryRequest) (*RunQueryResponse, error)UnsafeDatastoreServer
type UnsafeDatastoreServer interface {
// contains filtered or unexported methods
}UnsafeDatastoreServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DatastoreServer will result in compilation errors.
Value
type Value struct {
// Must have a value set.
//
// Types that are assignable to ValueType:
//
// *Value_NullValue
// *Value_BooleanValue
// *Value_IntegerValue
// *Value_DoubleValue
// *Value_TimestampValue
// *Value_KeyValue
// *Value_StringValue
// *Value_BlobValue
// *Value_GeoPointValue
// *Value_EntityValue
// *Value_ArrayValue
ValueType isValue_ValueType `protobuf_oneof:"value_type"`
// The `meaning` field should only be populated for backwards compatibility.
Meaning int32 `protobuf:"varint,14,opt,name=meaning,proto3" json:"meaning,omitempty"`
// If the value should be excluded from all indexes including those defined
// explicitly.
ExcludeFromIndexes bool `protobuf:"varint,19,opt,name=exclude_from_indexes,json=excludeFromIndexes,proto3" json:"exclude_from_indexes,omitempty"`
// contains filtered or unexported fields
}A message that can hold any of the supported value types and associated metadata.
func (*Value) Descriptor
Deprecated: Use Value.ProtoReflect.Descriptor instead.
func (*Value) GetArrayValue
func (x *Value) GetArrayValue() *ArrayValuefunc (*Value) GetBlobValue
func (*Value) GetBooleanValue
func (*Value) GetDoubleValue
func (*Value) GetEntityValue
func (*Value) GetExcludeFromIndexes
func (*Value) GetGeoPointValue
func (*Value) GetIntegerValue
func (*Value) GetKeyValue
func (*Value) GetMeaning
func (*Value) GetNullValue
func (*Value) GetStringValue
func (*Value) GetTimestampValue
func (x *Value) GetTimestampValue() *timestamppb.Timestampfunc (*Value) GetValueType
func (m *Value) GetValueType() isValue_ValueTypefunc (*Value) ProtoMessage
func (*Value) ProtoMessage()func (*Value) ProtoReflect
func (x *Value) ProtoReflect() protoreflect.Messagefunc (*Value) Reset
func (x *Value) Reset()func (*Value) String
Value_ArrayValue
type Value_ArrayValue struct {
// 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`.
ArrayValue *ArrayValue `protobuf:"bytes,9,opt,name=array_value,json=arrayValue,proto3,oneof"`
}Value_BlobValue
type Value_BlobValue struct {
// 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.
BlobValue []byte `protobuf:"bytes,18,opt,name=blob_value,json=blobValue,proto3,oneof"`
}Value_BooleanValue
type Value_BooleanValue struct {
// A boolean value.
BooleanValue bool `protobuf:"varint,1,opt,name=boolean_value,json=booleanValue,proto3,oneof"`
}Value_DoubleValue
type Value_DoubleValue struct {
// A double value.
DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"`
}Value_EntityValue
type Value_EntityValue struct {
// An entity value.
//
// - May have no key.
// - May have a key with an incomplete key path.
// - May have a reserved/read-only key.
EntityValue *Entity `protobuf:"bytes,6,opt,name=entity_value,json=entityValue,proto3,oneof"`
}Value_GeoPointValue
type Value_GeoPointValue struct {
// A geo point value representing a point on the surface of Earth.
GeoPointValue *latlng.LatLng `protobuf:"bytes,8,opt,name=geo_point_value,json=geoPointValue,proto3,oneof"`
}Value_IntegerValue
type Value_IntegerValue struct {
// An integer value.
IntegerValue int64 `protobuf:"varint,2,opt,name=integer_value,json=integerValue,proto3,oneof"`
}Value_KeyValue
type Value_KeyValue struct {
// A key value.
KeyValue *Key `protobuf:"bytes,5,opt,name=key_value,json=keyValue,proto3,oneof"`
}Value_NullValue
type Value_NullValue struct {
// A null value.
NullValue structpb.NullValue `protobuf:"varint,11,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"`
}Value_StringValue
type Value_StringValue struct {
// 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 most 1,000,000 bytes.
StringValue string `protobuf:"bytes,17,opt,name=string_value,json=stringValue,proto3,oneof"`
}Value_TimestampValue
type Value_TimestampValue struct {
// A timestamp value.
// When stored in the Datastore, precise only to microseconds;
// any additional precision is rounded down.
TimestampValue *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=timestamp_value,json=timestampValue,proto3,oneof"`
}