Class: Queris::Query::DiffOp

Inherits:
UnionOp show all
Defined in:
lib/queris/query/operations.rb

Constant Summary collapse

SYMBOL =
:'∖'
NAME =
:diff

Constants inherited from UnionOp

UnionOp::COMMAND, UnionOp::OPTIMIZATION_THRESHOLD_MULTIPLIER

Instance Attribute Summary

Attributes inherited from Op

#fragile, #operands

Instance Method Summary collapse

Methods inherited from UnionOp

#optimize

Methods inherited from Op

#command, #initialize, #json_redis_dump, #keys, #marshal_dump, #notready!, #operand_key, #optimize, #optimized?, #prepare, #push, #query_run_stage_inspect, #query_run_stage_release, #subqueries, #symbol, #temp_keys, #temp_keys?, #to_s, #weights

Constructor Details

This class inherits a constructor from Queris::Query::Op

Instance Method Details

#operand_key_weight(op = nil) ⇒ Object



355
# File 'lib/queris/query/operations.rb', line 355

def operand_key_weight(op=nil); :'-inf'; end

#run(redis, result_key, *arg) ⇒ Object



356
357
358
359
360
# File 'lib/queris/query/operations.rb', line 356

def run(redis, result_key, *arg)
  super redis, result_key, *arg
  redis.zremrangebyscore result_key, :'-inf', :'-inf'
  # BUG: sorted sets with -inf scores will be treated incorrectly when diffing
end

#target_key_weightObject



354
# File 'lib/queris/query/operations.rb', line 354

def target_key_weight; 0; end