Sha256: dd4a5a89eaf5cfa8dadc528d087fe5981ca09cca03e53c785d05c2f48435a107

Contents?: true

Size: 401 Bytes

Versions: 5

Compression:

Stored size: 401 Bytes

Contents

module Alf
  module Algebra
    module Operand

      def to_sql
        cog = to_cog
        if cog.respond_to?(:to_sql)
          cog.to_sql
        else
          Alf::Sql::Compiler.new.call(self).to_sql
        end
      rescue NotSupportedError => ex
        raise NotSupportedError, "Unable to compile `#{self}` to SQL"
      end

    end # module Operand
  end # module Algebra
end # module Alf

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-sql-0.16.3 lib/alf/algebra/operand.rb
alf-sql-0.16.2 lib/alf/algebra/operand.rb
alf-sql-0.16.1 lib/alf/algebra/operand.rb
alf-sql-0.16.0 lib/alf/algebra/operand.rb
alf-sql-0.15.0 lib/alf/algebra/operand.rb