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.23.3 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.23.2 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.23.1 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.23.0 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.21.5 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.21.4 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.20.5 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.19.3 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.21.3 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.21.2 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.21.0 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.20.4 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.20.2 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.20.1 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.20.0 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.19.2 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.19.1 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.19.0 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.18.15 lib/bmg/sql/nodes/group_by_clause.rb
bmg-0.18.14 lib/bmg/sql/nodes/group_by_clause.rb