Class: PgPipeline::PrepareRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/pg_pipeline/request.rb

Instance Attribute Summary collapse

Attributes inherited from Request

#cancelled, #error, #params, #query_boundary_seen, #result, #result_seen, #settled, #sql, #state, #waiter, #waiter_scheduler

Instance Method Summary collapse

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.



51
52
53
54
55
# File 'lib/pg_pipeline/request.rb', line 51

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_typesObject (readonly)

Returns the value of attribute param_types.



49
50
51
# File 'lib/pg_pipeline/request.rb', line 49

def param_types
  @param_types
end

#statement_nameObject (readonly)

Returns the value of attribute statement_name.



49
50
51
# File 'lib/pg_pipeline/request.rb', line 49

def statement_name
  @statement_name
end

Instance Method Details

#operationObject



57
# File 'lib/pg_pipeline/request.rb', line 57

def operation = :prepare