Sha256: 7648fd95d9c1b26480b5515e99a0e70bcba26e495b0867c19ca9b60699103023

Contents?: true

Size: 550 Bytes

Versions: 28

Compression:

Stored size: 550 Bytes

Contents

module Vertica
  module Messages
    class CommandComplete < BackendMessage
      message_id 'C'

      attr_reader :tag, :rows, :oid

      def initialize(data)
        case data = data.unpack('Z*').first
          when /^INSERT /
            @tag, oid, rows = data.split(' ', 3)
            @oid, @rows = oid.to_i, rows.to_i
          when /^DELETE /, /^UPDATE /, /^MOVE /, /^FETCH /, /^COPY /
            @tag, @rows = data.split(' ', 2)
            @rows = rows.to_i
          else
            @tag = data
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
vertica-0.12.0 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.11.4 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.11.3 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.11.2 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.11.1 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.11.0 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.10.5 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.10.4 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.10.3 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.10.2 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.10.1 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.10.0 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.6 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.5 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.4 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.3 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.2 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.1 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.0 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.0.beta9 lib/vertica/messages/backend_messages/command_complete.rb