Class: Aerospike::Exp::Operation

Inherits:
Object
  • Object
show all
Defined in:
lib/aerospike/exp/operation.rb

Overview

Expression operations.

Class Method Summary collapse

Class Method Details

.read(name, exp, flags = Aerospike::Exp::ReadFlags::DEFAULT) ⇒ Object

Create operation that performs a read expression. Requires server version 5.6.0+.

Parameters:

  • name

    variable name of read expression result. This name can be used as the bin name when retrieving bin results from the record.

  • exp

    expression to evaluate

  • flags (defaults to: Aerospike::Exp::ReadFlags::DEFAULT)

    expression read flags. See Exp::ExpReadFlags



40
41
42
# File 'lib/aerospike/exp/operation.rb', line 40

def self.read(name, exp, flags = Aerospike::Exp::ReadFlags::DEFAULT)
  create_operation(Aerospike::Operation::EXP_READ, name, exp, flags)
end

.write(bin_name, exp, flags = Aerospike::Exp::WriteFlags::DEFAULT) ⇒ Object

Create operation that performs an expression that writes to a record bin. Requires server version 5.6.0+.

Parameters:

  • bin_name

    name of bin to store expression result

  • exp

    expression to evaluate

  • flags (defaults to: Aerospike::Exp::WriteFlags::DEFAULT)

    expression write flags. See WriteFlags



28
29
30
# File 'lib/aerospike/exp/operation.rb', line 28

def self.write(bin_name, exp, flags = Aerospike::Exp::WriteFlags::DEFAULT)
  create_operation(Aerospike::Operation::EXP_MODIFY, bin_name, exp, flags)
end