Class: PostgresPR::RowDescription
- Defined in:
- lib/postgres-pr/message.rb
Defined Under Namespace
Classes: FieldInfo
Constant Summary
Constants inherited from Message
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
Instance Method Summary collapse
Methods inherited from Message
create, #dump, dump, read, register_message_type
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
257 258 259 |
# File 'lib/postgres-pr/message.rb', line 257 def fields @fields end |
Instance Method Details
#parse(buffer) ⇒ Object
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/postgres-pr/message.rb', line 261 def parse(buffer) super do nfields = buffer.read_int16 @fields = nfields.times.map do FieldInfo.new( buffer.read_cstring, buffer.read_int32, buffer.read_int16, buffer.read_int32, buffer.read_int16, buffer.read_int32, buffer.read_int16 ) end end end |