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



225
226
227
228
229
230
# File 'lib/postgres-pr/message.rb', line 225

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

#parse(buffer) ⇒ Object



232
233
234
235
236
237
# File 'lib/postgres-pr/message.rb', line 232

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