Class: Hotdog::Commands::Search::NothingNode

Inherits:
QueryExpressionNode show all
Defined in:
lib/hotdog/commands/search.rb

Instance Attribute Summary

Attributes inherited from QueryExpressionNode

#query, #values

Instance Method Summary collapse

Methods inherited from QueryExpressionNode

#dump

Methods inherited from ExpressionNode

#dump, #intermediates, #leafs, #optimize

Constructor Details

#initialize(options = {}) ⇒ NothingNode

Returns a new instance of NothingNode.



789
790
791
# File 'lib/hotdog/commands/search.rb', line 789

def initialize(options={})
  super("SELECT NULL AS host_id WHERE host_id NOT NULL", [], options)
end

Instance Method Details

#evaluate(environment, options = {}) ⇒ Object



793
794
795
796
797
798
799
# File 'lib/hotdog/commands/search.rb', line 793

def evaluate(environment, options={})
  if @fallback
    @fallback.evaluate(environment, options)
  else
    []
  end
end