Sha256: 3a6027ab4ff7906be96c6f5a3fdfa0b9537dd69df1173dfa99adbfec6cc6824d

Contents?: true

Size: 398 Bytes

Versions: 17

Compression:

Stored size: 398 Bytes

Contents

module RecordFilter
  class GroupBy # :nodoc: all
    include ColumnParser

    attr_reader :column, :table

    def initialize(column, table)
      @column, @table = column, table
    end

    def to_sql
      column, table = parse_column_in_table(@column, @table)

      if (table.has_column(column))
        "#{table.table_alias}.#{column}"
      else
        column
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
aub-record_filter-0.9.10 lib/record_filter/group_by.rb
aub-record_filter-0.9.11 lib/record_filter/group_by.rb
aub-record_filter-0.9.12 lib/record_filter/group_by.rb
aub-record_filter-0.9.4 lib/record_filter/group_by.rb
aub-record_filter-0.9.5 lib/record_filter/group_by.rb
aub-record_filter-0.9.6 lib/record_filter/group_by.rb
aub-record_filter-0.9.7 lib/record_filter/group_by.rb
aub-record_filter-0.9.8 lib/record_filter/group_by.rb
aub-record_filter-0.9.9 lib/record_filter/group_by.rb
record_filter-1.0.1 lib/record_filter/group_by.rb
record_filter-1.0.0 lib/record_filter/group_by.rb
record_filter-0.9.17 lib/record_filter/group_by.rb
record_filter-0.9.16 lib/record_filter/group_by.rb
record_filter-0.9.15 lib/record_filter/group_by.rb
record_filter-0.9.14 lib/record_filter/group_by.rb
record_filter-0.9.13 lib/record_filter/group_by.rb
record_filter-0.9.12 lib/record_filter/group_by.rb