google-cloud-firestore 1.2.4 → 1.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 624e1c2f31b57258eea410abcdb33d52562c1f23128890a3a3fd065a984d8c9e
4
- data.tar.gz: b6b834eca755a67b24b2c4b08f5fa52d5e40c3df469b64f29d77023188372197
3
+ metadata.gz: 388f42fa34e44a5331d19d8fd5069e2d28a7213a080e398f61b360be0986040e
4
+ data.tar.gz: e3370f1aeb624e54ad4f14762f82151c2393dd6a36c6631a5eadaf30f5f2cbfb
5
5
  SHA512:
6
- metadata.gz: fce2ab47a485ebfee11ee2c3ba25970c808c2796dee8224fb22470e802961e98435cec66281e633b8fa14685e75cb6169baabfe7260c821cb2ebe9ad6c451609
7
- data.tar.gz: 89c3a26866c079d668f3a57ca221321830070890ca3b55c4cf9ecb3e3684445ad61d000ac59e2a8065676e91c3e51daaf6166df2561175d78af2a53a0e0a3beb
6
+ metadata.gz: 73b290ce65d254e250a96ca950fad5e2fe48d321f4364b593db13438aab549864c38dd123f0c876a89efc63e68eed00c1520bb3a6be86b752ab5cd0c46d396ae
7
+ data.tar.gz: e40578ef50b3b11c630cba1219dde1a54b153a6d4b91e48ba2416ebac3aa1b2abac1ff48de8797d32a15cabf6fdb76b08972fcb7f60f0cecc20822594346691d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 1.3.0 / 2020-03-02
4
+
5
+ #### Features
6
+
7
+ * Add IN and ARRAY_CONTAINS_ANY query operators
8
+
3
9
  ### 1.2.4 / 2020-01-23
4
10
 
5
11
  #### Documentation
@@ -22,7 +22,7 @@ module Google
22
22
  # rubocop:disable LineLength
23
23
 
24
24
  ##
25
- # # Ruby Client for Google Cloud Firestore Admin API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
25
+ # # Ruby Client for Google Cloud Firestore Admin API
26
26
  #
27
27
  # [Google Cloud Firestore Admin API][Product Documentation]:
28
28
  # Accesses the NoSQL document database built for automatic scaling, high
@@ -24,7 +24,7 @@ module Google
24
24
  # rubocop:disable LineLength
25
25
 
26
26
  ##
27
- # # Ruby Client for Google Cloud Firestore Admin API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
27
+ # # Ruby Client for Google Cloud Firestore Admin API
28
28
  #
29
29
  # [Google Cloud Firestore Admin API][Product Documentation]:
30
30
  # Accesses the NoSQL document database built for automatic scaling, high
@@ -888,24 +888,27 @@ module Google
888
888
  ##
889
889
  # @private
890
890
  FILTER_OPS = {
891
- "<" => :LESS_THAN,
892
- "lt" => :LESS_THAN,
893
- "<=" => :LESS_THAN_OR_EQUAL,
894
- "lte" => :LESS_THAN_OR_EQUAL,
895
- ">" => :GREATER_THAN,
896
- "gt" => :GREATER_THAN,
897
- ">=" => :GREATER_THAN_OR_EQUAL,
898
- "gte" => :GREATER_THAN_OR_EQUAL,
899
- "=" => :EQUAL,
900
- "==" => :EQUAL,
901
- "eq" => :EQUAL,
902
- "eql" => :EQUAL,
903
- "is" => :EQUAL,
904
- "array_contains" => :ARRAY_CONTAINS,
905
- "array-contains" => :ARRAY_CONTAINS,
906
- "include" => :ARRAY_CONTAINS,
907
- "include?" => :ARRAY_CONTAINS,
908
- "has" => :ARRAY_CONTAINS
891
+ "<" => :LESS_THAN,
892
+ "lt" => :LESS_THAN,
893
+ "<=" => :LESS_THAN_OR_EQUAL,
894
+ "lte" => :LESS_THAN_OR_EQUAL,
895
+ ">" => :GREATER_THAN,
896
+ "gt" => :GREATER_THAN,
897
+ ">=" => :GREATER_THAN_OR_EQUAL,
898
+ "gte" => :GREATER_THAN_OR_EQUAL,
899
+ "=" => :EQUAL,
900
+ "==" => :EQUAL,
901
+ "eq" => :EQUAL,
902
+ "eql" => :EQUAL,
903
+ "is" => :EQUAL,
904
+ "array_contains" => :ARRAY_CONTAINS,
905
+ "array-contains" => :ARRAY_CONTAINS,
906
+ "include" => :ARRAY_CONTAINS,
907
+ "include?" => :ARRAY_CONTAINS,
908
+ "has" => :ARRAY_CONTAINS,
909
+ "in" => :IN,
910
+ "array_contains_any" => :ARRAY_CONTAINS_ANY,
911
+ "array-contains-any" => :ARRAY_CONTAINS_ANY
909
912
  }.freeze
910
913
  ##
911
914
  # @private
@@ -21,7 +21,7 @@ module Google
21
21
  # rubocop:disable LineLength
22
22
 
23
23
  ##
24
- # # Ruby Client for Google Cloud Firestore API ([GA](https://github.com/googleapis/google-cloud-ruby#versioning))
24
+ # # Ruby Client for Google Cloud Firestore API
25
25
  #
26
26
  # [Google Cloud Firestore API][Product Documentation]:
27
27
  #
@@ -153,6 +153,15 @@ module Google
153
153
  end
154
154
  end
155
155
 
156
+ # The projection of document's fields to return.
157
+ # @!attribute [rw] fields
158
+ # @return [Array<Google::Firestore::V1::StructuredQuery::FieldReference>]
159
+ # The fields to return.
160
+ #
161
+ # If empty, all fields are returned. To only return the name
162
+ # of the document, use `['__name__']`.
163
+ class Projection; end
164
+
156
165
  # A filter with a single operand.
157
166
  # @!attribute [rw] op
158
167
  # @return [Google::Firestore::V1::StructuredQuery::UnaryFilter::Operator]
@@ -174,6 +183,11 @@ module Google
174
183
  end
175
184
  end
176
185
 
186
+ # A reference to a field, such as `max(messages.time) as max_time`.
187
+ # @!attribute [rw] field_path
188
+ # @return [String]
189
+ class FieldReference; end
190
+
177
191
  # An order on a field.
178
192
  # @!attribute [rw] field
179
193
  # @return [Google::Firestore::V1::StructuredQuery::FieldReference]
@@ -183,20 +197,6 @@ module Google
183
197
  # The direction to order by. Defaults to `ASCENDING`.
184
198
  class Order; end
185
199
 
186
- # A reference to a field, such as `max(messages.time) as max_time`.
187
- # @!attribute [rw] field_path
188
- # @return [String]
189
- class FieldReference; end
190
-
191
- # The projection of document's fields to return.
192
- # @!attribute [rw] fields
193
- # @return [Array<Google::Firestore::V1::StructuredQuery::FieldReference>]
194
- # The fields to return.
195
- #
196
- # If empty, all fields are returned. To only return the name
197
- # of the document, use `['__name__']`.
198
- class Projection; end
199
-
200
200
  # A sort direction.
201
201
  module Direction
202
202
  # Unspecified.
@@ -27,9 +27,6 @@ module Google
27
27
  # @!attribute [rw] transform
28
28
  # @return [Google::Firestore::V1::DocumentTransform]
29
29
  # Applies a transformation to a document.
30
- # At most one `transform` per document is allowed in a given request.
31
- # An `update` cannot follow a `transform` on the same document in a given
32
- # request.
33
30
  # @!attribute [rw] update_mask
34
31
  # @return [Google::Firestore::V1::DocumentMask]
35
32
  # The fields to update in this write.
@@ -42,6 +39,13 @@ module Google
42
39
  # Fields referenced in the mask, but not present in the input document, are
43
40
  # deleted from the document on the server.
44
41
  # The field paths in this mask must not contain a reserved field name.
42
+ # @!attribute [rw] update_transforms
43
+ # @return [Array<Google::Firestore::V1::DocumentTransform::FieldTransform>]
44
+ # The transforms to perform after update.
45
+ #
46
+ # This field can be set only when the operation is `update`. If present, this
47
+ # write is equivalent to performing `update` and `transform` to the same
48
+ # document atomically and in order.
45
49
  # @!attribute [rw] current_document
46
50
  # @return [Google::Firestore::V1::Precondition]
47
51
  # An optional precondition on the document.
@@ -21,7 +21,7 @@ module Google
21
21
  # rubocop:disable LineLength
22
22
 
23
23
  ##
24
- # # Ruby Client for Google Cloud Firestore API ([GA](https://github.com/googleapis/google-cloud-ruby#versioning))
24
+ # # Ruby Client for Google Cloud Firestore API
25
25
  #
26
26
  # [Google Cloud Firestore API][Product Documentation]:
27
27
  #
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Firestore
19
- VERSION = "1.2.4".freeze
19
+ VERSION = "1.3.0".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/firestore/v1/firestore.proto for package 'google.firestore.v1'
3
3
  # Original file comments:
4
- # Copyright 2019 Google LLC.
4
+ # Copyright 2020 Google LLC
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
- #
19
18
 
20
19
 
21
20
  require 'grpc'
@@ -47,8 +46,6 @@ module Google
47
46
  rpc :GetDocument, GetDocumentRequest, Document
48
47
  # Lists documents.
49
48
  rpc :ListDocuments, ListDocumentsRequest, ListDocumentsResponse
50
- # Creates a new document.
51
- rpc :CreateDocument, CreateDocumentRequest, Document
52
49
  # Updates or inserts a document.
53
50
  rpc :UpdateDocument, UpdateDocumentRequest, Document
54
51
  # Deletes a document.
@@ -72,6 +69,8 @@ module Google
72
69
  rpc :Listen, stream(ListenRequest), stream(ListenResponse)
73
70
  # Lists all the collection IDs underneath a document.
74
71
  rpc :ListCollectionIds, ListCollectionIdsRequest, ListCollectionIdsResponse
72
+ # Creates a new document.
73
+ rpc :CreateDocument, CreateDocumentRequest, Document
75
74
  end
76
75
 
77
76
  Stub = Service.rpc_stub_class
@@ -53,6 +53,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
53
53
  value :IN, 8
54
54
  value :ARRAY_CONTAINS_ANY, 9
55
55
  end
56
+ add_message "google.firestore.v1.StructuredQuery.Projection" do
57
+ repeated :fields, :message, 2, "google.firestore.v1.StructuredQuery.FieldReference"
58
+ end
56
59
  add_message "google.firestore.v1.StructuredQuery.UnaryFilter" do
57
60
  optional :op, :enum, 1, "google.firestore.v1.StructuredQuery.UnaryFilter.Operator"
58
61
  oneof :operand_type do
@@ -64,15 +67,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
64
67
  value :IS_NAN, 2
65
68
  value :IS_NULL, 3
66
69
  end
67
- add_message "google.firestore.v1.StructuredQuery.Order" do
68
- optional :field, :message, 1, "google.firestore.v1.StructuredQuery.FieldReference"
69
- optional :direction, :enum, 2, "google.firestore.v1.StructuredQuery.Direction"
70
- end
71
70
  add_message "google.firestore.v1.StructuredQuery.FieldReference" do
72
71
  optional :field_path, :string, 2
73
72
  end
74
- add_message "google.firestore.v1.StructuredQuery.Projection" do
75
- repeated :fields, :message, 2, "google.firestore.v1.StructuredQuery.FieldReference"
73
+ add_message "google.firestore.v1.StructuredQuery.Order" do
74
+ optional :field, :message, 1, "google.firestore.v1.StructuredQuery.FieldReference"
75
+ optional :direction, :enum, 2, "google.firestore.v1.StructuredQuery.Direction"
76
76
  end
77
77
  add_enum "google.firestore.v1.StructuredQuery.Direction" do
78
78
  value :DIRECTION_UNSPECIFIED, 0
@@ -95,11 +95,11 @@ module Google
95
95
  StructuredQuery::CompositeFilter::Operator = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.CompositeFilter.Operator").enummodule
96
96
  StructuredQuery::FieldFilter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.FieldFilter").msgclass
97
97
  StructuredQuery::FieldFilter::Operator = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.FieldFilter.Operator").enummodule
98
+ StructuredQuery::Projection = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Projection").msgclass
98
99
  StructuredQuery::UnaryFilter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.UnaryFilter").msgclass
99
100
  StructuredQuery::UnaryFilter::Operator = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.UnaryFilter.Operator").enummodule
100
- StructuredQuery::Order = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Order").msgclass
101
101
  StructuredQuery::FieldReference = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.FieldReference").msgclass
102
- StructuredQuery::Projection = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Projection").msgclass
102
+ StructuredQuery::Order = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Order").msgclass
103
103
  StructuredQuery::Direction = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Direction").enummodule
104
104
  Cursor = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Cursor").msgclass
105
105
  end
@@ -11,6 +11,7 @@ require 'google/api/annotations_pb'
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_message "google.firestore.v1.Write" do
13
13
  optional :update_mask, :message, 3, "google.firestore.v1.DocumentMask"
14
+ repeated :update_transforms, :message, 7, "google.firestore.v1.DocumentTransform.FieldTransform"
14
15
  optional :current_document, :message, 4, "google.firestore.v1.Precondition"
15
16
  oneof :operation do
16
17
  optional :update, :message, 1, "google.firestore.v1.Document"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-firestore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-23 00:00:00.000000000 Z
11
+ date: 2020-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core