Class: ConceptQL::Nodes::Numeric

Inherits:
PassThru show all
Defined in:
lib/conceptql/nodes/numeric.rb

Overview

Represents a node that will either:

  • create a value_as_numeric value for every person in the database

  • change the value_as_numeric value for every every result passed in

    • either to a numeric

    • or a value from a column in the origin row

Accepts two params:

  • Either a numeric value or a symbol representing a column name

  • An optional stream

Constant Summary

Constants inherited from Node

ConceptQL::Nodes::Node::COLUMNS

Instance Attribute Summary

Attributes inherited from Node

#values

Instance Method Summary collapse

Methods inherited from Node

#arguments, #children, #columns, #evaluate, #initialize, #select_it, #sql, #stream

Constructor Details

This class inherits a constructor from ConceptQL::Nodes::Node

Instance Method Details

#query(db) ⇒ Object



15
16
17
# File 'lib/conceptql/nodes/numeric.rb', line 15

def query(db)
  stream.nil? ? as_criterion(db) : with_kids(db)
end

#typesObject



19
20
21
# File 'lib/conceptql/nodes/numeric.rb', line 19

def types
  stream.nil? ? [:person] : super
end