Class: Aerospike::PredExp::Op

Inherits:
Aerospike::PredExp show all
Defined in:
lib/aerospike/query/pred_exp/op.rb

Constant Summary

Constants inherited from Aerospike::PredExp

AND, GEOJSON_BIN, GEOJSON_CONTAINS, GEOJSON_VALUE, GEOJSON_VAR, GEOJSON_WITHIN, INTEGER_BIN, INTEGER_EQUAL, INTEGER_GREATER, INTEGER_GREATEREQ, INTEGER_LESS, INTEGER_LESSEQ, INTEGER_UNEQUAL, INTEGER_VALUE, INTEGER_VAR, LAST_UPDATE, LIST_BIN, LIST_ITERATE_AND, LIST_ITERATE_OR, MAPKEY_ITERATE_AND, MAPKEY_ITERATE_OR, MAPVAL_ITERATE_AND, MAPVAL_ITERATE_OR, MAP_BIN, NOT, OR, RECSIZE, STRING_BIN, STRING_EQUAL, STRING_REGEX, STRING_UNEQUAL, STRING_VALUE, STRING_VAR, VOID_TIME

Instance Method Summary collapse

Methods inherited from Aerospike::PredExp

and, estimate_size, geojson_bin, geojson_contains, geojson_value, geojson_var, geojson_within, integer_bin, integer_equal, integer_greater, integer_greater_eq, integer_less, integer_less_eq, integer_unequal, integer_value, integer_var, last_update, list_bin, list_iterate_and, list_iterate_or, map_bin, mapkey_iterate_and, mapkey_iterate_or, mapval_iterate_and, mapval_iterate_or, not, or, record_size, string_bin, string_equal, string_regex, string_unequal, string_value, string_var, void_time, write

Constructor Details

#initialize(op) ⇒ Op

Returns a new instance of Op.



6
7
8
# File 'lib/aerospike/query/pred_exp/op.rb', line 6

def initialize(op)
  @op = op
end

Instance Method Details

#estimate_sizeObject



10
11
12
# File 'lib/aerospike/query/pred_exp/op.rb', line 10

def estimate_size
  6
end

#write(buffer, offset) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/aerospike/query/pred_exp/op.rb', line 14

def write(buffer, offset)
  # write type
  buffer.write_int16(@op, offset)
  offset += 2

  # write zero length
  buffer.write_int32(0, offset)
  offset += 4

  offset
end