Sha256: 05a75aba9279cd6272ff54a67a343ee80b84d06fdf783e2ba9ec5563df3d71e4

Contents?: true

Size: 469 Bytes

Versions: 1

Compression:

Stored size: 469 Bytes

Contents

require 'rom/sql/dsl'
require 'rom/sql/expression'

module ROM
  module SQL
    class RestrictionDSL < DSL
      # @api private
      def call(&block)
        instance_exec(&block)
      end

      private

      # @api private
      def method_missing(meth, *args, &block)
        if schema.key?(meth)
          ::ROM::SQL::Expression.new(schema[meth])
        else
          ::Sequel::VIRTUAL_ROW.__send__(meth, *args, &block)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rom-sql-1.0.0.beta1 lib/rom/sql/restriction_dsl.rb