Method: Cequel::Metal::Inserter#execute

Defined in:
lib/cequel/metal/inserter.rb

#execute(options = {}) ⇒ void

This method returns an undefined value.

Execute the statement as a write operation

Parameters:

  • options (Options) (defaults to: {})

    options

Options Hash (options):

  • :consistency (Symbol)

    what consistency level to use for the operation

  • :ttl (Integer)

    time-to-live in seconds for the written data

  • :timestamp (Time, Integer)

    the timestamp associated with the column values

Since:

  • 1.0.0



22
23
24
25
26
27
28
# File 'lib/cequel/metal/inserter.rb', line 22

def execute(options = {})
  statement = Statement.new
  consistency = options.fetch(:consistency, data_set.query_consistency)
  write_to_statement(statement, options)
  data_set.write_with_consistency(
    statement.cql, statement.bind_vars, consistency)
end