Class: PostgresPR::Query
Constant Summary
Constants inherited from Message
Instance Attribute Summary collapse
-
#query ⇒ Object
Returns the value of attribute query.
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(query) ⇒ Query
constructor
:nocov:.
Methods inherited from Message
create, dump, #parse, read, register_message_type
Constructor Details
#initialize(query) ⇒ Query
:nocov:
243 244 245 |
# File 'lib/postgres-pr/message.rb', line 243 def initialize(query) @query = String.new(query).force_encoding('BINARY') end |
Instance Attribute Details
#query ⇒ Object
Returns the value of attribute query.
234 235 236 |
# File 'lib/postgres-pr/message.rb', line 234 def query @query end |
Instance Method Details
#dump ⇒ Object
248 249 250 251 252 |
# File 'lib/postgres-pr/message.rb', line 248 def dump super(@query.size + 1) do |buffer| buffer.write_cstring(@query) end end |