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.9.0.beta8 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.0.beta7 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.0.beta6 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.0.beta5 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.0.beta4 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.0.beta3 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.0.beta2 lib/vertica/messages/backend_messages/command_complete.rb
vertica-0.9.0.beta1 lib/vertica/messages/backend_messages/command_complete.rb