Class: Cql::Client::SynchronousPreparedStatement

Inherits:
PreparedStatement show all
Includes:
SynchronousBacktrace
Defined in:
lib/cql/client/synchronous_prepared_statement.rb

Instance Attribute Summary

Attributes inherited from PreparedStatement

#metadata

Instance Method Summary collapse

Methods included from SynchronousBacktrace

#synchronous_backtrace

Constructor Details

#initialize(async_statement) ⇒ SynchronousPreparedStatement

Returns a new instance of SynchronousPreparedStatement.



9
10
11
12
# File 'lib/cql/client/synchronous_prepared_statement.rb', line 9

def initialize(async_statement)
  @async_statement = async_statement
  @metadata = async_statement.
end

Instance Method Details

#asyncObject



24
25
26
# File 'lib/cql/client/synchronous_prepared_statement.rb', line 24

def async
  @async_statement
end

#execute(*args) ⇒ Object



14
15
16
# File 'lib/cql/client/synchronous_prepared_statement.rb', line 14

def execute(*args)
  synchronous_backtrace { @async_statement.execute(*args).value }
end

#pipeline {|pl| ... } ⇒ Object

Yields:

  • (pl)


18
19
20
21
22
# File 'lib/cql/client/synchronous_prepared_statement.rb', line 18

def pipeline
  pl = Pipeline.new(@async_statement)
  yield pl
  synchronous_backtrace { pl.value }
end