Sha256: 79686615d0f4a45a60cc3f4de1d4d99d6c672bb855f81363b0845f19d21d349a
Contents?: true
Size: 639 Bytes
Versions: 25
Compression:
Stored size: 639 Bytes
Contents
module Vertica module Messages class Bind < FrontendMessage message_id 'B' def initialize(portal_name, prepared_statement_name, parameter_values) @portal_name = portal_name @prepared_statement_name = prepared_statement_name @parameter_values = parameter_values end def to_bytes bytes = [@portal_name, @prepared_statement_name, 0, @parameter_values.length].pack('Z*Z*nn') bytes << @parameter_values.map { |val| val.nil? ? [-1].pack('N') : [val.length, val].pack('Na*') }.join('') bytes << [0].pack('n') message_string bytes end end end end
Version data entries
25 entries across 25 versions & 1 rubygems