Sha256: 8b41538f5ebe9a70285b96113d9555b2f793fee89c4d79a7d5dc90efee087593

Contents?: true

Size: 516 Bytes

Versions: 27

Compression:

Stored size: 516 Bytes

Contents

module Vertica
  module Messages
    class DataRow < BackendMessage
      message_id 'D'

      attr_reader :values

      def initialize(data)
        @values = []
        field_count = data.unpack('n').first
        pos = 2
        field_count.times do |field_index|
          size = data.unpack("@#{pos}N").first
          size = -1 if size == 4294967295
          @values << (size == -1 ? nil : data.unpack("@#{pos + 4}a#{size}").first)
          pos += 4 + [size, 0].max
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

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