Sha256: 40198fd6fdddde0c8e88c9599402bbe1d51b8171c8969ec7b6b0c9fbe56583d8

Contents?: true

Size: 442 Bytes

Versions: 52

Compression:

Stored size: 442 Bytes

Contents

module Bmg
  module Sql
    module GroupByClause
      include Expr

      GROUP_BY = "GROUP BY".freeze

      def to_sql(buffer, dialect)
        return buffer if size == 1
        buffer << GROUP_BY << SPACE
        each_child do |item,index|
          buffer << COMMA << SPACE unless index == 0
          item.to_sql(buffer, dialect)
        end
        buffer
      end

    end # module GroupByClause
  end # module Sql
end # module Bmg

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
bmg-0.17.2 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.16.7 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.17.1 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.17.0 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.16.6 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.16.5 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.16.4 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.16.3 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.16.2 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.16.1 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.16.0 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.16.0.pre.rc2 lib/bmg/sql/nodes/group_by_clause.rb