Class: PostgresPR::ParameterStatus

Inherits:
Message
  • Object
show all
Defined in:
lib/postgres-pr/message.rb

Constant Summary

Constants inherited from Message

Message::MsgTypeMap

Instance Method Summary collapse

Methods inherited from Message

create, dump, fields, read, register_message_type

Instance Method Details

#dumpObject



210
211
212
213
214
215
# File 'lib/postgres-pr/message.rb', line 210

def dump
  super(@key.size + 1 + @value.size + 1) do |buffer|
    buffer.write_cstring(@key)
    buffer.write_cstring(@value)
  end
end

#parse(buffer) ⇒ Object



217
218
219
220
221
222
# File 'lib/postgres-pr/message.rb', line 217

def parse(buffer)
  super do
    @key = buffer.read_cstring
    @value = buffer.read_cstring
  end
end