class Rasti::DB::NQL::Nodes::Attribute
Public Instance Methods
column()
click to toggle source
# File lib/rasti/db/nql/nodes/attribute.rb, line 19 def column _column.text_value.to_sym end
computed_attributes(collection_class)
click to toggle source
# File lib/rasti/db/nql/nodes/attribute.rb, line 23 def computed_attributes(collection_class) computed?(collection_class) ? [column] : [] end
identifier(collection_class)
click to toggle source
# File lib/rasti/db/nql/nodes/attribute.rb, line 7 def identifier(collection_class) if computed? collection_class collection_class.computed_attributes[column].identifier else tables.empty? ? Sequel[column] : Sequel[tables.join('__').to_sym][column] end end
tables()
click to toggle source
# File lib/rasti/db/nql/nodes/attribute.rb, line 15 def tables _tables.elements.map{ |e| e.table.text_value } end
Private Instance Methods
computed?(collection_class)
click to toggle source
# File lib/rasti/db/nql/nodes/attribute.rb, line 29 def computed?(collection_class) collection_class.computed_attributes.key? column end