class ActiveFacts::Generators::Expression
Constants
- MM
Attributes
is_array[R]
This doesn't handle Postgres expressions, which can include a sub-table (e.g. via unnest)
is_mandatory[R]
type_num[R]
value[R]
Public Class Methods
new(value, type_num, is_mandatory, is_array = false)
click to toggle source
Construct an expression that addresses a field from a Metamodel::Component
# File lib/activefacts/generator/traits/expr.rb, line 26 def initialize value, type_num, is_mandatory, is_array = false @type_num = type_num @value = value @is_mandatory = is_mandatory @is_array = is_array end
Public Instance Methods
inspect()
click to toggle source
# File lib/activefacts/generator/traits/expr.rb, line 37 def inspect "Expression(#{value.inspect}, #{@type_num ? ActiveFacts::Metamodel::DataType::TypeNames[@type_num] : 'unknown'}, #{@is_mandatory ? 'mandatory' : 'nullable'}#{@is_array ? ', array' : ''})" end
to_s()
click to toggle source
# File lib/activefacts/generator/traits/expr.rb, line 33 def to_s value end