google-cloud-datastore-v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-datastore-v1.rb +21 -0
- data/lib/google/cloud/datastore/v1.rb +35 -0
- data/lib/google/cloud/datastore/v1/datastore.rb +53 -0
- data/lib/google/cloud/datastore/v1/datastore/client.rb +893 -0
- data/lib/google/cloud/datastore/v1/datastore/credentials.rb +52 -0
- data/lib/google/cloud/datastore/v1/version.rb +28 -0
- data/lib/google/datastore/v1/datastore_pb.rb +150 -0
- data/lib/google/datastore/v1/datastore_services_pb.rb +66 -0
- data/lib/google/datastore/v1/entity_pb.rb +67 -0
- data/lib/google/datastore/v1/query_pb.rb +135 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/datastore/v1/datastore.rb +349 -0
- data/proto_docs/google/datastore/v1/entity.rb +222 -0
- data/proto_docs/google/datastore/v1/query.rb +348 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/type/latlng.rb +38 -0
- metadata +207 -0
@@ -0,0 +1,222 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Datastore
|
23
|
+
module V1
|
24
|
+
# A partition ID identifies a grouping of entities. The grouping is always
|
25
|
+
# by project and namespace, however the namespace ID may be empty.
|
26
|
+
#
|
27
|
+
# A partition ID contains several dimensions:
|
28
|
+
# project ID and namespace ID.
|
29
|
+
#
|
30
|
+
# Partition dimensions:
|
31
|
+
#
|
32
|
+
# - May be `""`.
|
33
|
+
# - Must be valid UTF-8 bytes.
|
34
|
+
# - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
|
35
|
+
# If the value of any dimension matches regex `__.*__`, the partition is
|
36
|
+
# reserved/read-only.
|
37
|
+
# A reserved/read-only partition ID is forbidden in certain documented
|
38
|
+
# contexts.
|
39
|
+
#
|
40
|
+
# Foreign partition IDs (in which the project ID does
|
41
|
+
# not match the context project ID ) are discouraged.
|
42
|
+
# Reads and writes of foreign partition IDs may fail if the project is not in
|
43
|
+
# an active state.
|
44
|
+
# @!attribute [rw] project_id
|
45
|
+
# @return [::String]
|
46
|
+
# The ID of the project to which the entities belong.
|
47
|
+
# @!attribute [rw] namespace_id
|
48
|
+
# @return [::String]
|
49
|
+
# If not empty, the ID of the namespace to which the entities belong.
|
50
|
+
class PartitionId
|
51
|
+
include ::Google::Protobuf::MessageExts
|
52
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
53
|
+
end
|
54
|
+
|
55
|
+
# A unique identifier for an entity.
|
56
|
+
# If a key's partition ID or any of its path kinds or names are
|
57
|
+
# reserved/read-only, the key is reserved/read-only.
|
58
|
+
# A reserved/read-only key is forbidden in certain documented contexts.
|
59
|
+
# @!attribute [rw] partition_id
|
60
|
+
# @return [::Google::Cloud::Datastore::V1::PartitionId]
|
61
|
+
# Entities are partitioned into subsets, currently identified by a project
|
62
|
+
# ID and namespace ID.
|
63
|
+
# Queries are scoped to a single partition.
|
64
|
+
# @!attribute [rw] path
|
65
|
+
# @return [::Array<::Google::Cloud::Datastore::V1::Key::PathElement>]
|
66
|
+
# The entity path.
|
67
|
+
# An entity path consists of one or more elements composed of a kind and a
|
68
|
+
# string or numerical identifier, which identify entities. The first
|
69
|
+
# element identifies a _root entity_, the second element identifies
|
70
|
+
# a _child_ of the root entity, the third element identifies a child of the
|
71
|
+
# second entity, and so forth. The entities identified by all prefixes of
|
72
|
+
# the path are called the element's _ancestors_.
|
73
|
+
#
|
74
|
+
# An entity path is always fully complete: *all* of the entity's ancestors
|
75
|
+
# are required to be in the path along with the entity identifier itself.
|
76
|
+
# The only exception is that in some documented cases, the identifier in the
|
77
|
+
# last path element (for the entity) itself may be omitted. For example,
|
78
|
+
# the last path element of the key of `Mutation.insert` may have no
|
79
|
+
# identifier.
|
80
|
+
#
|
81
|
+
# A path can never be empty, and a path can have at most 100 elements.
|
82
|
+
class Key
|
83
|
+
include ::Google::Protobuf::MessageExts
|
84
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
85
|
+
|
86
|
+
# A (kind, ID/name) pair used to construct a key path.
|
87
|
+
#
|
88
|
+
# If either name or ID is set, the element is complete.
|
89
|
+
# If neither is set, the element is incomplete.
|
90
|
+
# @!attribute [rw] kind
|
91
|
+
# @return [::String]
|
92
|
+
# The kind of the entity.
|
93
|
+
# A kind matching regex `__.*__` is reserved/read-only.
|
94
|
+
# A kind must not contain more than 1500 bytes when UTF-8 encoded.
|
95
|
+
# Cannot be `""`.
|
96
|
+
# @!attribute [rw] id
|
97
|
+
# @return [::Integer]
|
98
|
+
# The auto-allocated ID of the entity.
|
99
|
+
# Never equal to zero. Values less than zero are discouraged and may not
|
100
|
+
# be supported in the future.
|
101
|
+
# @!attribute [rw] name
|
102
|
+
# @return [::String]
|
103
|
+
# The name of the entity.
|
104
|
+
# A name matching regex `__.*__` is reserved/read-only.
|
105
|
+
# A name must not be more than 1500 bytes when UTF-8 encoded.
|
106
|
+
# Cannot be `""`.
|
107
|
+
class PathElement
|
108
|
+
include ::Google::Protobuf::MessageExts
|
109
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
# An array value.
|
114
|
+
# @!attribute [rw] values
|
115
|
+
# @return [::Array<::Google::Cloud::Datastore::V1::Value>]
|
116
|
+
# Values in the array.
|
117
|
+
# The order of values in an array is preserved as long as all values have
|
118
|
+
# identical settings for 'exclude_from_indexes'.
|
119
|
+
class ArrayValue
|
120
|
+
include ::Google::Protobuf::MessageExts
|
121
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
122
|
+
end
|
123
|
+
|
124
|
+
# A message that can hold any of the supported value types and associated
|
125
|
+
# metadata.
|
126
|
+
# @!attribute [rw] null_value
|
127
|
+
# @return [::Google::Protobuf::NullValue]
|
128
|
+
# A null value.
|
129
|
+
# @!attribute [rw] boolean_value
|
130
|
+
# @return [::Boolean]
|
131
|
+
# A boolean value.
|
132
|
+
# @!attribute [rw] integer_value
|
133
|
+
# @return [::Integer]
|
134
|
+
# An integer value.
|
135
|
+
# @!attribute [rw] double_value
|
136
|
+
# @return [::Float]
|
137
|
+
# A double value.
|
138
|
+
# @!attribute [rw] timestamp_value
|
139
|
+
# @return [::Google::Protobuf::Timestamp]
|
140
|
+
# A timestamp value.
|
141
|
+
# When stored in the Datastore, precise only to microseconds;
|
142
|
+
# any additional precision is rounded down.
|
143
|
+
# @!attribute [rw] key_value
|
144
|
+
# @return [::Google::Cloud::Datastore::V1::Key]
|
145
|
+
# A key value.
|
146
|
+
# @!attribute [rw] string_value
|
147
|
+
# @return [::String]
|
148
|
+
# A UTF-8 encoded string value.
|
149
|
+
# When `exclude_from_indexes` is false (it is indexed), may have at most
|
150
|
+
# 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
|
151
|
+
# @!attribute [rw] blob_value
|
152
|
+
# @return [::String]
|
153
|
+
# A blob value.
|
154
|
+
# May have at most 1,000,000 bytes.
|
155
|
+
# When `exclude_from_indexes` is false, may have at most 1500 bytes.
|
156
|
+
# In JSON requests, must be base64-encoded.
|
157
|
+
# @!attribute [rw] geo_point_value
|
158
|
+
# @return [::Google::Type::LatLng]
|
159
|
+
# A geo point value representing a point on the surface of Earth.
|
160
|
+
# @!attribute [rw] entity_value
|
161
|
+
# @return [::Google::Cloud::Datastore::V1::Entity]
|
162
|
+
# An entity value.
|
163
|
+
#
|
164
|
+
# - May have no key.
|
165
|
+
# - May have a key with an incomplete key path.
|
166
|
+
# - May have a reserved/read-only key.
|
167
|
+
# @!attribute [rw] array_value
|
168
|
+
# @return [::Google::Cloud::Datastore::V1::ArrayValue]
|
169
|
+
# An array value.
|
170
|
+
# Cannot contain another array value.
|
171
|
+
# A `Value` instance that sets field `array_value` must not set fields
|
172
|
+
# `meaning` or `exclude_from_indexes`.
|
173
|
+
# @!attribute [rw] meaning
|
174
|
+
# @return [::Integer]
|
175
|
+
# The `meaning` field should only be populated for backwards compatibility.
|
176
|
+
# @!attribute [rw] exclude_from_indexes
|
177
|
+
# @return [::Boolean]
|
178
|
+
# If the value should be excluded from all indexes including those defined
|
179
|
+
# explicitly.
|
180
|
+
class Value
|
181
|
+
include ::Google::Protobuf::MessageExts
|
182
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
183
|
+
end
|
184
|
+
|
185
|
+
# A Datastore data object.
|
186
|
+
#
|
187
|
+
# An entity is limited to 1 megabyte when stored. That _roughly_
|
188
|
+
# corresponds to a limit of 1 megabyte for the serialized form of this
|
189
|
+
# message.
|
190
|
+
# @!attribute [rw] key
|
191
|
+
# @return [::Google::Cloud::Datastore::V1::Key]
|
192
|
+
# The entity's key.
|
193
|
+
#
|
194
|
+
# An entity must have a key, unless otherwise documented (for example,
|
195
|
+
# an entity in `Value.entity_value` may have no key).
|
196
|
+
# An entity's kind is its key path's last element's kind,
|
197
|
+
# or null if it has no key.
|
198
|
+
# @!attribute [rw] properties
|
199
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Datastore::V1::Value}]
|
200
|
+
# The entity's properties.
|
201
|
+
# The map's keys are property names.
|
202
|
+
# A property name matching regex `__.*__` is reserved.
|
203
|
+
# A reserved property name is forbidden in certain documented contexts.
|
204
|
+
# The name must not contain more than 500 characters.
|
205
|
+
# The name cannot be `""`.
|
206
|
+
class Entity
|
207
|
+
include ::Google::Protobuf::MessageExts
|
208
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
209
|
+
|
210
|
+
# @!attribute [rw] key
|
211
|
+
# @return [::String]
|
212
|
+
# @!attribute [rw] value
|
213
|
+
# @return [::Google::Cloud::Datastore::V1::Value]
|
214
|
+
class PropertiesEntry
|
215
|
+
include ::Google::Protobuf::MessageExts
|
216
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
@@ -0,0 +1,348 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Datastore
|
23
|
+
module V1
|
24
|
+
# The result of fetching an entity from Datastore.
|
25
|
+
# @!attribute [rw] entity
|
26
|
+
# @return [::Google::Cloud::Datastore::V1::Entity]
|
27
|
+
# The resulting entity.
|
28
|
+
# @!attribute [rw] version
|
29
|
+
# @return [::Integer]
|
30
|
+
# The version of the entity, a strictly positive number that monotonically
|
31
|
+
# increases with changes to the entity.
|
32
|
+
#
|
33
|
+
# This field is set for {::Google::Cloud::Datastore::V1::EntityResult::ResultType::FULL `FULL`} entity
|
34
|
+
# results.
|
35
|
+
#
|
36
|
+
# For {::Google::Cloud::Datastore::V1::LookupResponse#missing missing} entities in `LookupResponse`, this
|
37
|
+
# is the version of the snapshot that was used to look up the entity, and it
|
38
|
+
# is always set except for eventually consistent reads.
|
39
|
+
# @!attribute [rw] cursor
|
40
|
+
# @return [::String]
|
41
|
+
# A cursor that points to the position after the result entity.
|
42
|
+
# Set only when the `EntityResult` is part of a `QueryResultBatch` message.
|
43
|
+
class EntityResult
|
44
|
+
include ::Google::Protobuf::MessageExts
|
45
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
46
|
+
|
47
|
+
# Specifies what data the 'entity' field contains.
|
48
|
+
# A `ResultType` is either implied (for example, in `LookupResponse.missing`
|
49
|
+
# from `datastore.proto`, it is always `KEY_ONLY`) or specified by context
|
50
|
+
# (for example, in message `QueryResultBatch`, field `entity_result_type`
|
51
|
+
# specifies a `ResultType` for all the values in field `entity_results`).
|
52
|
+
module ResultType
|
53
|
+
# Unspecified. This value is never used.
|
54
|
+
RESULT_TYPE_UNSPECIFIED = 0
|
55
|
+
|
56
|
+
# The key and properties.
|
57
|
+
FULL = 1
|
58
|
+
|
59
|
+
# A projected subset of properties. The entity may have no key.
|
60
|
+
PROJECTION = 2
|
61
|
+
|
62
|
+
# Only the key.
|
63
|
+
KEY_ONLY = 3
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# A query for entities.
|
68
|
+
# @!attribute [rw] projection
|
69
|
+
# @return [::Array<::Google::Cloud::Datastore::V1::Projection>]
|
70
|
+
# The projection to return. Defaults to returning all properties.
|
71
|
+
# @!attribute [rw] kind
|
72
|
+
# @return [::Array<::Google::Cloud::Datastore::V1::KindExpression>]
|
73
|
+
# The kinds to query (if empty, returns entities of all kinds).
|
74
|
+
# Currently at most 1 kind may be specified.
|
75
|
+
# @!attribute [rw] filter
|
76
|
+
# @return [::Google::Cloud::Datastore::V1::Filter]
|
77
|
+
# The filter to apply.
|
78
|
+
# @!attribute [rw] order
|
79
|
+
# @return [::Array<::Google::Cloud::Datastore::V1::PropertyOrder>]
|
80
|
+
# The order to apply to the query results (if empty, order is unspecified).
|
81
|
+
# @!attribute [rw] distinct_on
|
82
|
+
# @return [::Array<::Google::Cloud::Datastore::V1::PropertyReference>]
|
83
|
+
# The properties to make distinct. The query results will contain the first
|
84
|
+
# result for each distinct combination of values for the given properties
|
85
|
+
# (if empty, all results are returned).
|
86
|
+
# @!attribute [rw] start_cursor
|
87
|
+
# @return [::String]
|
88
|
+
# A starting point for the query results. Query cursors are
|
89
|
+
# returned in query result batches and
|
90
|
+
# [can only be used to continue the same
|
91
|
+
# query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
|
92
|
+
# @!attribute [rw] end_cursor
|
93
|
+
# @return [::String]
|
94
|
+
# An ending point for the query results. Query cursors are
|
95
|
+
# returned in query result batches and
|
96
|
+
# [can only be used to limit the same
|
97
|
+
# query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
|
98
|
+
# @!attribute [rw] offset
|
99
|
+
# @return [::Integer]
|
100
|
+
# The number of results to skip. Applies before limit, but after all other
|
101
|
+
# constraints. Optional. Must be >= 0 if specified.
|
102
|
+
# @!attribute [rw] limit
|
103
|
+
# @return [::Google::Protobuf::Int32Value]
|
104
|
+
# The maximum number of results to return. Applies after all other
|
105
|
+
# constraints. Optional.
|
106
|
+
# Unspecified is interpreted as no limit.
|
107
|
+
# Must be >= 0 if specified.
|
108
|
+
class Query
|
109
|
+
include ::Google::Protobuf::MessageExts
|
110
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
111
|
+
end
|
112
|
+
|
113
|
+
# A representation of a kind.
|
114
|
+
# @!attribute [rw] name
|
115
|
+
# @return [::String]
|
116
|
+
# The name of the kind.
|
117
|
+
class KindExpression
|
118
|
+
include ::Google::Protobuf::MessageExts
|
119
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
120
|
+
end
|
121
|
+
|
122
|
+
# A reference to a property relative to the kind expressions.
|
123
|
+
# @!attribute [rw] name
|
124
|
+
# @return [::String]
|
125
|
+
# The name of the property.
|
126
|
+
# If name includes "."s, it may be interpreted as a property name path.
|
127
|
+
class PropertyReference
|
128
|
+
include ::Google::Protobuf::MessageExts
|
129
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
130
|
+
end
|
131
|
+
|
132
|
+
# A representation of a property in a projection.
|
133
|
+
# @!attribute [rw] property
|
134
|
+
# @return [::Google::Cloud::Datastore::V1::PropertyReference]
|
135
|
+
# The property to project.
|
136
|
+
class Projection
|
137
|
+
include ::Google::Protobuf::MessageExts
|
138
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
139
|
+
end
|
140
|
+
|
141
|
+
# The desired order for a specific property.
|
142
|
+
# @!attribute [rw] property
|
143
|
+
# @return [::Google::Cloud::Datastore::V1::PropertyReference]
|
144
|
+
# The property to order by.
|
145
|
+
# @!attribute [rw] direction
|
146
|
+
# @return [::Google::Cloud::Datastore::V1::PropertyOrder::Direction]
|
147
|
+
# The direction to order by. Defaults to `ASCENDING`.
|
148
|
+
class PropertyOrder
|
149
|
+
include ::Google::Protobuf::MessageExts
|
150
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
151
|
+
|
152
|
+
# The sort direction.
|
153
|
+
module Direction
|
154
|
+
# Unspecified. This value must not be used.
|
155
|
+
DIRECTION_UNSPECIFIED = 0
|
156
|
+
|
157
|
+
# Ascending.
|
158
|
+
ASCENDING = 1
|
159
|
+
|
160
|
+
# Descending.
|
161
|
+
DESCENDING = 2
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# A holder for any type of filter.
|
166
|
+
# @!attribute [rw] composite_filter
|
167
|
+
# @return [::Google::Cloud::Datastore::V1::CompositeFilter]
|
168
|
+
# A composite filter.
|
169
|
+
# @!attribute [rw] property_filter
|
170
|
+
# @return [::Google::Cloud::Datastore::V1::PropertyFilter]
|
171
|
+
# A filter on a property.
|
172
|
+
class Filter
|
173
|
+
include ::Google::Protobuf::MessageExts
|
174
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
175
|
+
end
|
176
|
+
|
177
|
+
# A filter that merges multiple other filters using the given operator.
|
178
|
+
# @!attribute [rw] op
|
179
|
+
# @return [::Google::Cloud::Datastore::V1::CompositeFilter::Operator]
|
180
|
+
# The operator for combining multiple filters.
|
181
|
+
# @!attribute [rw] filters
|
182
|
+
# @return [::Array<::Google::Cloud::Datastore::V1::Filter>]
|
183
|
+
# The list of filters to combine.
|
184
|
+
# Must contain at least one filter.
|
185
|
+
class CompositeFilter
|
186
|
+
include ::Google::Protobuf::MessageExts
|
187
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
188
|
+
|
189
|
+
# A composite filter operator.
|
190
|
+
module Operator
|
191
|
+
# Unspecified. This value must not be used.
|
192
|
+
OPERATOR_UNSPECIFIED = 0
|
193
|
+
|
194
|
+
# The results are required to satisfy each of the combined filters.
|
195
|
+
AND = 1
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
# A filter on a specific property.
|
200
|
+
# @!attribute [rw] property
|
201
|
+
# @return [::Google::Cloud::Datastore::V1::PropertyReference]
|
202
|
+
# The property to filter by.
|
203
|
+
# @!attribute [rw] op
|
204
|
+
# @return [::Google::Cloud::Datastore::V1::PropertyFilter::Operator]
|
205
|
+
# The operator to filter by.
|
206
|
+
# @!attribute [rw] value
|
207
|
+
# @return [::Google::Cloud::Datastore::V1::Value]
|
208
|
+
# The value to compare the property to.
|
209
|
+
class PropertyFilter
|
210
|
+
include ::Google::Protobuf::MessageExts
|
211
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
212
|
+
|
213
|
+
# A property filter operator.
|
214
|
+
module Operator
|
215
|
+
# Unspecified. This value must not be used.
|
216
|
+
OPERATOR_UNSPECIFIED = 0
|
217
|
+
|
218
|
+
# Less than.
|
219
|
+
LESS_THAN = 1
|
220
|
+
|
221
|
+
# Less than or equal.
|
222
|
+
LESS_THAN_OR_EQUAL = 2
|
223
|
+
|
224
|
+
# Greater than.
|
225
|
+
GREATER_THAN = 3
|
226
|
+
|
227
|
+
# Greater than or equal.
|
228
|
+
GREATER_THAN_OR_EQUAL = 4
|
229
|
+
|
230
|
+
# Equal.
|
231
|
+
EQUAL = 5
|
232
|
+
|
233
|
+
# Has ancestor.
|
234
|
+
HAS_ANCESTOR = 11
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
# A [GQL
|
239
|
+
# query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
|
240
|
+
# @!attribute [rw] query_string
|
241
|
+
# @return [::String]
|
242
|
+
# A string of the format described
|
243
|
+
# [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
|
244
|
+
# @!attribute [rw] allow_literals
|
245
|
+
# @return [::Boolean]
|
246
|
+
# When false, the query string must not contain any literals and instead must
|
247
|
+
# bind all values. For example,
|
248
|
+
# `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
|
249
|
+
# `SELECT * FROM Kind WHERE a = @value` is.
|
250
|
+
# @!attribute [rw] named_bindings
|
251
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Datastore::V1::GqlQueryParameter}]
|
252
|
+
# For each non-reserved named binding site in the query string, there must be
|
253
|
+
# a named parameter with that name, but not necessarily the inverse.
|
254
|
+
#
|
255
|
+
# Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
|
256
|
+
# `__.*__`, and must not be `""`.
|
257
|
+
# @!attribute [rw] positional_bindings
|
258
|
+
# @return [::Array<::Google::Cloud::Datastore::V1::GqlQueryParameter>]
|
259
|
+
# Numbered binding site @1 references the first numbered parameter,
|
260
|
+
# effectively using 1-based indexing, rather than the usual 0.
|
261
|
+
#
|
262
|
+
# For each binding site numbered i in `query_string`, there must be an i-th
|
263
|
+
# numbered parameter. The inverse must also be true.
|
264
|
+
class GqlQuery
|
265
|
+
include ::Google::Protobuf::MessageExts
|
266
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
267
|
+
|
268
|
+
# @!attribute [rw] key
|
269
|
+
# @return [::String]
|
270
|
+
# @!attribute [rw] value
|
271
|
+
# @return [::Google::Cloud::Datastore::V1::GqlQueryParameter]
|
272
|
+
class NamedBindingsEntry
|
273
|
+
include ::Google::Protobuf::MessageExts
|
274
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
# A binding parameter for a GQL query.
|
279
|
+
# @!attribute [rw] value
|
280
|
+
# @return [::Google::Cloud::Datastore::V1::Value]
|
281
|
+
# A value parameter.
|
282
|
+
# @!attribute [rw] cursor
|
283
|
+
# @return [::String]
|
284
|
+
# A query cursor. Query cursors are returned in query
|
285
|
+
# result batches.
|
286
|
+
class GqlQueryParameter
|
287
|
+
include ::Google::Protobuf::MessageExts
|
288
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
289
|
+
end
|
290
|
+
|
291
|
+
# A batch of results produced by a query.
|
292
|
+
# @!attribute [rw] skipped_results
|
293
|
+
# @return [::Integer]
|
294
|
+
# The number of results skipped, typically because of an offset.
|
295
|
+
# @!attribute [rw] skipped_cursor
|
296
|
+
# @return [::String]
|
297
|
+
# A cursor that points to the position after the last skipped result.
|
298
|
+
# Will be set when `skipped_results` != 0.
|
299
|
+
# @!attribute [rw] entity_result_type
|
300
|
+
# @return [::Google::Cloud::Datastore::V1::EntityResult::ResultType]
|
301
|
+
# The result type for every entity in `entity_results`.
|
302
|
+
# @!attribute [rw] entity_results
|
303
|
+
# @return [::Array<::Google::Cloud::Datastore::V1::EntityResult>]
|
304
|
+
# The results for this batch.
|
305
|
+
# @!attribute [rw] end_cursor
|
306
|
+
# @return [::String]
|
307
|
+
# A cursor that points to the position after the last result in the batch.
|
308
|
+
# @!attribute [rw] more_results
|
309
|
+
# @return [::Google::Cloud::Datastore::V1::QueryResultBatch::MoreResultsType]
|
310
|
+
# The state of the query after the current batch.
|
311
|
+
# @!attribute [rw] snapshot_version
|
312
|
+
# @return [::Integer]
|
313
|
+
# The version number of the snapshot this batch was returned from.
|
314
|
+
# This applies to the range of results from the query's `start_cursor` (or
|
315
|
+
# the beginning of the query if no cursor was given) to this batch's
|
316
|
+
# `end_cursor` (not the query's `end_cursor`).
|
317
|
+
#
|
318
|
+
# In a single transaction, subsequent query result batches for the same query
|
319
|
+
# can have a greater snapshot version number. Each batch's snapshot version
|
320
|
+
# is valid for all preceding batches.
|
321
|
+
# The value will be zero for eventually consistent queries.
|
322
|
+
class QueryResultBatch
|
323
|
+
include ::Google::Protobuf::MessageExts
|
324
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
325
|
+
|
326
|
+
# The possible values for the `more_results` field.
|
327
|
+
module MoreResultsType
|
328
|
+
# Unspecified. This value is never used.
|
329
|
+
MORE_RESULTS_TYPE_UNSPECIFIED = 0
|
330
|
+
|
331
|
+
# There may be additional batches to fetch from this query.
|
332
|
+
NOT_FINISHED = 1
|
333
|
+
|
334
|
+
# The query is finished, but there may be more results after the limit.
|
335
|
+
MORE_RESULTS_AFTER_LIMIT = 2
|
336
|
+
|
337
|
+
# The query is finished, but there may be more results after the end
|
338
|
+
# cursor.
|
339
|
+
MORE_RESULTS_AFTER_CURSOR = 4
|
340
|
+
|
341
|
+
# The query is finished, and there are no more results.
|
342
|
+
NO_MORE_RESULTS = 3
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|
346
|
+
end
|
347
|
+
end
|
348
|
+
end
|