Sha256: f295fe42844e3f23a9700c2a12d0edcf2c81ead22250775ebd0e7296e8c83611

Contents?: true

Size: 470 Bytes

Versions: 5

Compression:

Stored size: 470 Bytes

Contents

module Alf
  module Sql
    module WithSpec
      include Expr

      def to_sql(buffer = "")
        each_child do |child,index|
          buffer << COMMA << SPACE unless index==0
          child.to_sql(buffer)
        end
        buffer
      end

      def to_hash
        hash = {}
        each_child do |child|
          hash[child.table_name.value] = child.subquery
        end
        hash
      end

    end # module WithSpec
  end # module Sql
end # module Alf

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-sql-0.16.3 lib/alf/sql/nodes/with_spec.rb
alf-sql-0.16.2 lib/alf/sql/nodes/with_spec.rb
alf-sql-0.16.1 lib/alf/sql/nodes/with_spec.rb
alf-sql-0.16.0 lib/alf/sql/nodes/with_spec.rb
alf-sql-0.15.0 lib/alf/sql/nodes/with_spec.rb