Sha256: fb34881ca28c22bb9ef65a75fba1b1fc759507e5c5f961cea13cbecbf262992b
Contents?: true
Size: 875 Bytes
Versions: 11
Compression:
Stored size: 875 Bytes
Contents
module Rasti module DB module NQL module Nodes class Attribute < Treetop::Runtime::SyntaxNode 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 def tables _tables.elements.map{ |e| e.table.text_value } end def column _column.text_value.to_sym end def computed_attributes(collection_class) computed?(collection_class) ? [column] : [] end private def computed?(collection_class) collection_class.computed_attributes.key? column end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems