Class: Cql::Client::SynchronousPreparedStatement

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

Instance Attribute Summary

Attributes inherited from PreparedStatement

#metadata

Instance Method Summary collapse

Constructor Details

#initialize(async_statement) ⇒ SynchronousPreparedStatement

Returns a new instance of SynchronousPreparedStatement.



7
8
9
10
# File 'lib/cql/client/synchronous_prepared_statement.rb', line 7

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

Instance Method Details

#asyncObject



22
23
24
# File 'lib/cql/client/synchronous_prepared_statement.rb', line 22

def async
  @async_statement
end

#execute(*args) ⇒ Object



12
13
14
# File 'lib/cql/client/synchronous_prepared_statement.rb', line 12

def execute(*args)
  @async_statement.execute(*args).get
end

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

Yields:

  • (pl)


16
17
18
19
20
# File 'lib/cql/client/synchronous_prepared_statement.rb', line 16

def pipeline
  pl = Pipeline.new(@async_statement)
  yield pl
  pl.get
end