google-cloud-firestore 1.2.2 → 1.2.3
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/google/cloud/firestore/client.rb +1 -1
- data/lib/google/cloud/firestore/document_reference/list.rb +9 -9
- data/lib/google/cloud/firestore/v1.rb +6 -14
- data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/firestore.rb +4 -2
- data/lib/google/cloud/firestore/v1/firestore_client.rb +6 -14
- data/lib/google/cloud/firestore/version.rb +1 -1
- data/lib/google/firestore/v1/firestore_services_pb.rb +6 -14
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: b2db5afa9c8b97cc6f37a5afc6b1a274dff52e18b6c7301085528458944348d9
         | 
| 4 | 
            +
              data.tar.gz: 83502ab6aaca0c180cadd1d3606cd1a5b41c63c023725a983245f0034121bb51
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ba4f6c4d01bcce435ad522c180b7c5392a769728caa5be27a7d596c7e6617b4422b16d07e0864ac93a38169ef53971340d91ca53968e7138fbc48e1e04abde5a
         | 
| 7 | 
            +
              data.tar.gz: 5efbf5c6c3e5aedff79c7f1d78c73f99b7be3071ef7c6e20da3d5a64fdf6fbbaed3f00fd9001d5938c1031ae8feec09cb7899faf2dae63d6f643cca81bf32f40
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
| @@ -672,7 +672,7 @@ module Google | |
| 672 672 | 
             
                      ensure_service!
         | 
| 673 673 | 
             
                      grpc = service.list_documents \
         | 
| 674 674 | 
             
                        parent, collection_id, token: token, max: max
         | 
| 675 | 
            -
                      DocumentReference::List.from_grpc grpc,  | 
| 675 | 
            +
                      DocumentReference::List.from_grpc grpc, self, parent, collection_id
         | 
| 676 676 | 
             
                    end
         | 
| 677 677 |  | 
| 678 678 | 
             
                    protected
         | 
| @@ -85,10 +85,10 @@ module Google | |
| 85 85 | 
             
                      #   end
         | 
| 86 86 | 
             
                      def next
         | 
| 87 87 | 
             
                        return nil unless next?
         | 
| 88 | 
            -
                         | 
| 88 | 
            +
                        ensure_client!
         | 
| 89 89 | 
             
                        options = { token: token, max: @max }
         | 
| 90 | 
            -
                        grpc = @service.list_documents @parent, @collection_id, options
         | 
| 91 | 
            -
                        self.class.from_grpc grpc, @ | 
| 90 | 
            +
                        grpc = @client.service.list_documents @parent, @collection_id, options
         | 
| 91 | 
            +
                        self.class.from_grpc grpc, @client, @parent, @collection_id, @max
         | 
| 92 92 | 
             
                      end
         | 
| 93 93 |  | 
| 94 94 | 
             
                      ##
         | 
| @@ -163,16 +163,16 @@ module Google | |
| 163 163 | 
             
                      ##
         | 
| 164 164 | 
             
                      # @private New DocumentReference::List from a
         | 
| 165 165 | 
             
                      # Google::Firestore::V1::ListDocumentsResponse object.
         | 
| 166 | 
            -
                      def self.from_grpc grpc,  | 
| 166 | 
            +
                      def self.from_grpc grpc, client, parent, collection_id, max = nil
         | 
| 167 167 | 
             
                        documents = List.new(Array(grpc.documents).map do |document|
         | 
| 168 | 
            -
                          DocumentReference.from_path document.name,  | 
| 168 | 
            +
                          DocumentReference.from_path document.name, client
         | 
| 169 169 | 
             
                        end)
         | 
| 170 170 | 
             
                        documents.instance_variable_set :@parent, parent
         | 
| 171 171 | 
             
                        documents.instance_variable_set :@collection_id, collection_id
         | 
| 172 172 | 
             
                        token = grpc.next_page_token
         | 
| 173 173 | 
             
                        token = nil if token == "".freeze
         | 
| 174 174 | 
             
                        documents.instance_variable_set :@token, token
         | 
| 175 | 
            -
                        documents.instance_variable_set :@ | 
| 175 | 
            +
                        documents.instance_variable_set :@client, client
         | 
| 176 176 | 
             
                        documents.instance_variable_set :@max, max
         | 
| 177 177 | 
             
                        documents
         | 
| 178 178 | 
             
                      end
         | 
| @@ -180,9 +180,9 @@ module Google | |
| 180 180 | 
             
                      protected
         | 
| 181 181 |  | 
| 182 182 | 
             
                      ##
         | 
| 183 | 
            -
                      # Raise an error unless an active  | 
| 184 | 
            -
                      def  | 
| 185 | 
            -
                        raise "Must have active connection" unless @ | 
| 183 | 
            +
                      # Raise an error unless an active client is available.
         | 
| 184 | 
            +
                      def ensure_client!
         | 
| 185 | 
            +
                        raise "Must have active connection" unless @client
         | 
| 186 186 | 
             
                      end
         | 
| 187 187 | 
             
                    end
         | 
| 188 188 | 
             
                  end
         | 
| @@ -81,20 +81,12 @@ module Google | |
| 81 81 | 
             
                    ##
         | 
| 82 82 | 
             
                    # The Cloud Firestore service.
         | 
| 83 83 | 
             
                    #
         | 
| 84 | 
            -
                    #  | 
| 85 | 
            -
                    #
         | 
| 86 | 
            -
                    #  | 
| 87 | 
            -
                    # | 
| 88 | 
            -
                    # | 
| 89 | 
            -
                    #  | 
| 90 | 
            -
                    #   every time a document is modified. Does not change when a write results
         | 
| 91 | 
            -
                    #   in no modifications. Increases in a strict monotonic fashion.
         | 
| 92 | 
            -
                    # * `read_time` - The time at which a particular state was observed. Used
         | 
| 93 | 
            -
                    #   to denote a consistent snapshot of the database or the time at which a
         | 
| 94 | 
            -
                    #   Document was observed to not exist.
         | 
| 95 | 
            -
                    # * `commit_time` - The time at which the writes in a transaction were
         | 
| 96 | 
            -
                    #   committed. Any read with an equal or greater `read_time` is guaranteed
         | 
| 97 | 
            -
                    #   to see the effects of the transaction.
         | 
| 84 | 
            +
                    # Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL
         | 
| 85 | 
            +
                    # document database that simplifies storing, syncing, and querying data for
         | 
| 86 | 
            +
                    # your mobile, web, and IoT apps at global scale. Its client libraries provide
         | 
| 87 | 
            +
                    # live synchronization and offline support, while its security features and
         | 
| 88 | 
            +
                    # integrations with Firebase and Google Cloud Platform (GCP) accelerate
         | 
| 89 | 
            +
                    # building truly serverless apps.
         | 
| 98 90 | 
             
                    #
         | 
| 99 91 | 
             
                    # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
         | 
| 100 92 | 
             
                    #   Provides the means for authenticating requests made by the client. This parameter can
         | 
| @@ -247,7 +247,8 @@ module Google | |
| 247 247 | 
             
                  #     request.
         | 
| 248 248 | 
             
                  # @!attribute [rw] commit_time
         | 
| 249 249 | 
             
                  #   @return [Google::Protobuf::Timestamp]
         | 
| 250 | 
            -
                  #     The time at which the commit occurred.
         | 
| 250 | 
            +
                  #     The time at which the commit occurred. Any read with an equal or greater
         | 
| 251 | 
            +
                  #     `read_time` is guaranteed to see the effects of the commit.
         | 
| 251 252 | 
             
                  class CommitResponse; end
         | 
| 252 253 |  | 
| 253 254 | 
             
                  # The request for {Google::Firestore::V1::Firestore::Rollback Firestore::Rollback}.
         | 
| @@ -381,7 +382,8 @@ module Google | |
| 381 382 | 
             
                  #     request.
         | 
| 382 383 | 
             
                  # @!attribute [rw] commit_time
         | 
| 383 384 | 
             
                  #   @return [Google::Protobuf::Timestamp]
         | 
| 384 | 
            -
                  #     The time at which the commit occurred.
         | 
| 385 | 
            +
                  #     The time at which the commit occurred. Any read with an equal or greater
         | 
| 386 | 
            +
                  #     `read_time` is guaranteed to see the effects of the write.
         | 
| 385 387 | 
             
                  class WriteResponse; end
         | 
| 386 388 |  | 
| 387 389 | 
             
                  # A request for {Google::Firestore::V1::Firestore::Listen Firestore::Listen}
         | 
| @@ -35,20 +35,12 @@ module Google | |
| 35 35 | 
             
                  module V1
         | 
| 36 36 | 
             
                    # The Cloud Firestore service.
         | 
| 37 37 | 
             
                    #
         | 
| 38 | 
            -
                    #  | 
| 39 | 
            -
                    #
         | 
| 40 | 
            -
                    #  | 
| 41 | 
            -
                    # | 
| 42 | 
            -
                    # | 
| 43 | 
            -
                    #  | 
| 44 | 
            -
                    #   every time a document is modified. Does not change when a write results
         | 
| 45 | 
            -
                    #   in no modifications. Increases in a strict monotonic fashion.
         | 
| 46 | 
            -
                    # * `read_time` - The time at which a particular state was observed. Used
         | 
| 47 | 
            -
                    #   to denote a consistent snapshot of the database or the time at which a
         | 
| 48 | 
            -
                    #   Document was observed to not exist.
         | 
| 49 | 
            -
                    # * `commit_time` - The time at which the writes in a transaction were
         | 
| 50 | 
            -
                    #   committed. Any read with an equal or greater `read_time` is guaranteed
         | 
| 51 | 
            -
                    #   to see the effects of the transaction.
         | 
| 38 | 
            +
                    # Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL
         | 
| 39 | 
            +
                    # document database that simplifies storing, syncing, and querying data for
         | 
| 40 | 
            +
                    # your mobile, web, and IoT apps at global scale. Its client libraries provide
         | 
| 41 | 
            +
                    # live synchronization and offline support, while its security features and
         | 
| 42 | 
            +
                    # integrations with Firebase and Google Cloud Platform (GCP) accelerate
         | 
| 43 | 
            +
                    # building truly serverless apps.
         | 
| 52 44 | 
             
                    #
         | 
| 53 45 | 
             
                    # @!attribute [r] firestore_stub
         | 
| 54 46 | 
             
                    #   @return [Google::Firestore::V1::Firestore::Stub]
         | 
| @@ -29,20 +29,12 @@ module Google | |
| 29 29 | 
             
                    #
         | 
| 30 30 | 
             
                    # The Cloud Firestore service.
         | 
| 31 31 | 
             
                    #
         | 
| 32 | 
            -
                    #  | 
| 33 | 
            -
                    #
         | 
| 34 | 
            -
                    #  | 
| 35 | 
            -
                    # | 
| 36 | 
            -
                    # | 
| 37 | 
            -
                    #  | 
| 38 | 
            -
                    #      every time a document is modified. Does not change when a write results
         | 
| 39 | 
            -
                    #      in no modifications. Increases in a strict monotonic fashion.
         | 
| 40 | 
            -
                    # *    `read_time` - The time at which a particular state was observed. Used
         | 
| 41 | 
            -
                    #      to denote a consistent snapshot of the database or the time at which a
         | 
| 42 | 
            -
                    #      Document was observed to not exist.
         | 
| 43 | 
            -
                    # *    `commit_time` - The time at which the writes in a transaction were
         | 
| 44 | 
            -
                    #      committed. Any read with an equal or greater `read_time` is guaranteed
         | 
| 45 | 
            -
                    #      to see the effects of the transaction.
         | 
| 32 | 
            +
                    # Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL
         | 
| 33 | 
            +
                    # document database that simplifies storing, syncing, and querying data for
         | 
| 34 | 
            +
                    # your mobile, web, and IoT apps at global scale. Its client libraries provide
         | 
| 35 | 
            +
                    # live synchronization and offline support, while its security features and
         | 
| 36 | 
            +
                    # integrations with Firebase and Google Cloud Platform (GCP) accelerate
         | 
| 37 | 
            +
                    # building truly serverless apps.
         | 
| 46 38 | 
             
                    class Service
         | 
| 47 39 |  | 
| 48 40 | 
             
                      include GRPC::GenericService
         | 
    
        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 | 
            +
              version: 1.2.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Google Inc
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2020-01-08 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: google-cloud-core
         |