Class: Cql::Client::AsynchronousPreparedStatement

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

Instance Attribute Summary

Attributes inherited from PreparedStatement

#metadata

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ AsynchronousPreparedStatement

Returns a new instance of AsynchronousPreparedStatement.



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

def initialize(*args)
  @client, @connection_id, @statement_id, @raw_metadata = args
  @metadata = ResultMetadata.new(@raw_metadata)
end

Instance Method Details

#execute(*args) ⇒ Object



12
13
14
15
16
# File 'lib/cql/client/asynchronous_prepared_statement.rb', line 12

def execute(*args)
  bound_args = args.shift(@raw_metadata.size)
  consistency_level = args.shift
  @client.execute_statement(@connection_id, @statement_id, @raw_metadata, bound_args, consistency_level)
end