Sha256: b857cee50f7db496c8257c01022082de74e4b2a5397f884e612f7cdb319c4ade

Contents?: true

Size: 1.38 KB

Versions: 28

Compression:

Stored size: 1.38 KB

Contents

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


require "google/cloud/spanner/convert"

module Google
  module Cloud
    module Spanner
      class CommitResponse
        ##
        # # CommitStats
        #
        # Statistical information of a transaction commit.
        #
        class CommitStats
          ##
          # @private Creates a new CommitStats instance.
          def initialize grpc
            @grpc = grpc
          end

          # The total number of the mutations for the transaction.
          # @return [Integer]
          def mutation_count
            @grpc.mutation_count
          end

          ##
          # @private
          # Creates a new CommitStats instance from a
          # `Google::Cloud::Spanner::V1::CommitResponse::CommitStats`.
          def self.from_grpc grpc
            new grpc
          end
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
google-cloud-spanner-2.24.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.23.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.22.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.21.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.20.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.19.1 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.19.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.18.1 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.18.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.17.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.16.1 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.16.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.15.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.14.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.13.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.12.1 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.12.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.11.0 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.10.1 lib/google/cloud/spanner/commit_response/commit_stats.rb
google-cloud-spanner-2.10.0 lib/google/cloud/spanner/commit_response/commit_stats.rb