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



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

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

#parse(buffer) ⇒ Object



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

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