Class: Hotdog::Expression::NothingNode

Inherits:
QueryExpressionNode show all
Defined in:
lib/hotdog/expression/semantics.rb

Instance Attribute Summary

Attributes inherited from QueryExpressionNode

#query, #values

Instance Method Summary collapse

Methods inherited from QueryExpressionNode

#dump

Methods inherited from ExpressionNode

#dump, #optimize

Constructor Details

#initialize(options = {}) ⇒ NothingNode

Returns a new instance of NothingNode.



512
513
514
# File 'lib/hotdog/expression/semantics.rb', line 512

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

Instance Method Details

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



516
517
518
519
520
521
522
# File 'lib/hotdog/expression/semantics.rb', line 516

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