Sha256: e95a167632fafdf482f05891b6358dac29b99ba8dee5f6eaab0af3c6e6f5d665
Contents?: true
Size: 1.17 KB
Versions: 12
Compression:
Stored size: 1.17 KB
Contents
class Card module Query class AbstractQuery # shared methods for queries module QueryHelper def direct_subqueries subqueries_with_fasten :direct end def subqueries_with_fasten fasten list = [] subqueries.each do |s| next unless Array.wrap(fasten).include? s.fasten list << s list += s.subqueries_with_fasten s.fasten end list end def table_alias @table_alias ||= begin if fasten == :direct @superquery.table_alias else "#{table_prefix}#{root.table_seq}#{@table_suffix}" end end end def table_seq @table_seq = @table_seq ? (@table_seq + 1) : 0 end def fld field_name "#{table_alias}.#{field_name}" end def add_condition *args @conditions << if args.size > 1 [args.shift, Query::Value.new(args.shift, self)] else args[0] end end def current_conjunction "AND" end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems