Class: PgPipeline::PrepareRequest

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

Instance Attribute Summary collapse

Attributes inherited from Request

#cancelled, #condition, #error, #params, #query_boundary_seen, #result, #result_seen, #settled, #sql, #state

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.



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_typesObject (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_nameObject (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

#operationObject



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

def operation = :prepare