class Cql::Client::SynchronousPreparedStatement

@private

Public Class Methods

new(async_statement) click to toggle source
# File lib/cql/client/prepared_statement.rb, line 246
def initialize(async_statement)
  @async_statement = async_statement
  @metadata = async_statement.metadata
  @result_metadata = async_statement.result_metadata
end

Public Instance Methods

add_to_batch(batch, connection, bound_arguments) click to toggle source

@private

# File lib/cql/client/prepared_statement.rb, line 284
def add_to_batch(batch, connection, bound_arguments)
  @async_statement.add_to_batch(batch, connection, bound_arguments)
end
async() click to toggle source
# File lib/cql/client/prepared_statement.rb, line 274
def async
  @async_statement
end
batch(type=:logged, options=nil, &block) click to toggle source
# File lib/cql/client/prepared_statement.rb, line 260
def batch(type=:logged, options=nil, &block)
  if block_given?
    synchronous_backtrace { @async_statement.batch(type, options, &block).value }
  else
    SynchronousPreparedStatementBatch.new(@async_statement.batch(type, options))
  end
end
execute(*args) click to toggle source
# File lib/cql/client/prepared_statement.rb, line 252
def execute(*args)
  synchronous_backtrace do
    result = @async_statement.execute(*args).value
    result = SynchronousPagedQueryResult.new(result) if result.is_a?(PagedQueryResult)
    result
  end
end
pipeline() { |pl| ... } click to toggle source
# File lib/cql/client/prepared_statement.rb, line 268
def pipeline
  pl = Pipeline.new(@async_statement)
  yield pl
  synchronous_backtrace { pl.value }
end
prepared?(connection) click to toggle source

@private

# File lib/cql/client/prepared_statement.rb, line 279
def prepared?(connection)
  @async_statement.prepared?(connection)
end