Class: Zena::Use::QueryLink::Compiler
- Inherits:
-
QueryBuilder::Processor
- Object
- QueryBuilder::Processor
- Zena::Use::QueryLink::Compiler
- Defined in:
- lib/zena/use/query_link.rb
Instance Attribute Summary collapse
-
#node_name ⇒ Object
readonly
Returns the value of attribute node_name.
Instance Method Summary collapse
- #map_attr(fld) ⇒ Object
-
#process_field(field_name) ⇒ Object
Overwrite this and take car to check for valid fields.
Instance Attribute Details
#node_name ⇒ Object (readonly)
Returns the value of attribute node_name.
34 35 36 |
# File 'lib/zena/use/query_link.rb', line 34 def node_name @node_name end |
Instance Method Details
#map_attr(fld) ⇒ Object
49 50 51 52 |
# File 'lib/zena/use/query_link.rb', line 49 def map_attr(fld) # error nil end |
#process_field(field_name) ⇒ Object
Overwrite this and take car to check for valid fields.
40 41 42 43 44 45 46 47 |
# File 'lib/zena/use/query_link.rb', line 40 def process_field(field_name) if %w{comment status date name}.include?(field_name) field_name = 'comment' if field_name == 'name' "#{table}.#{field_name}" else super # raise an error end end |