Class: PgPipeline::PrepareRequest
- Defined in:
- lib/pg_pipeline/request.rb
Instance Attribute Summary collapse
-
#param_types ⇒ Object
readonly
Returns the value of attribute param_types.
-
#statement_name ⇒ Object
readonly
Returns the value of attribute statement_name.
Attributes inherited from Request
#cancelled, #condition, #error, #params, #query_boundary_seen, #result, #result_seen, #settled, #sql, #state
Instance Method Summary collapse
-
#initialize(statement) ⇒ PrepareRequest
constructor
A new instance of PrepareRequest.
- #operation ⇒ Object
Methods inherited from Request
#accept_result, #cancel!, #cancelled?, #dispatched!, #finish!, prepare, prepared_query, #query_boundary!, #query_boundary_seen?, #queued!, #record_error!, #reject!, #settled?, #wait
Constructor Details
#initialize(statement) ⇒ PrepareRequest
Returns a new instance of PrepareRequest.
52 53 54 55 56 |
# File 'lib/pg_pipeline/request.rb', line 52 def initialize(statement) super(sql: statement.sql) @statement_name = RequestOps.snapshot_name(statement.physical_name) @param_types = RequestOps.snapshot_param_types(statement.param_types) end |
Instance Attribute Details
#param_types ⇒ Object (readonly)
Returns the value of attribute param_types.
50 51 52 |
# File 'lib/pg_pipeline/request.rb', line 50 def param_types @param_types end |
#statement_name ⇒ Object (readonly)
Returns the value of attribute statement_name.
50 51 52 |
# File 'lib/pg_pipeline/request.rb', line 50 def statement_name @statement_name end |
Instance Method Details
#operation ⇒ Object
58 |
# File 'lib/pg_pipeline/request.rb', line 58 def operation = :prepare |