Class: StickyElephant::PostgresSimulator
- Inherits:
-
Object
- Object
- StickyElephant::PostgresSimulator
- Includes:
- PostgresProtocol
- Defined in:
- lib/sticky_elephant/postgres_simulator.rb
Constant Summary
Constants included from PostgresProtocol
StickyElephant::PostgresProtocol::COMMAND_COMPLETE_COMMANDS, StickyElephant::PostgresProtocol::READY_FOR_QUERY_STATUSES
Instance Attribute Summary collapse
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(query_string) ⇒ PostgresSimulator
constructor
A new instance of PostgresSimulator.
- #to_s ⇒ Object
Methods included from PostgresProtocol
#command_complete, #data_row, #int16_bytes, #int32_bytes, #ready_for_query, #row_description, #with_length
Constructor Details
#initialize(query_string) ⇒ PostgresSimulator
Returns a new instance of PostgresSimulator.
7 8 9 10 |
# File 'lib/sticky_elephant/postgres_simulator.rb', line 7 def initialize(query_string) @query = normalize(query_string) simulate end |
Instance Attribute Details
#query ⇒ Object (readonly)
Returns the value of attribute query.
5 6 7 |
# File 'lib/sticky_elephant/postgres_simulator.rb', line 5 def query @query end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/sticky_elephant/postgres_simulator.rb', line 5 def response @response end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/sticky_elephant/postgres_simulator.rb', line 12 def to_s response end |