require DataMapper.root / 'lib' / 'dm-core' / 'adapters' / 'data_objects_adapter'

require 'do_sqlserver'

module DataMapper
  module Adapters
    class SqlserverAdapter < DataObjectsAdapter
      module SQL #:nodoc:
        private

        # TODO: document
        # @api private
        def supports_default_values? #:nodoc:
          false
        end

        # TODO: document
        # @api private
        def regexp_operator(operand)
          'REGEXP'
        end

        # TODO: document
        # @api private
        def not_regexp_operator(operand)
          'NOT REGEXP'
        end

        # TODO: document
        # @api private
        def quote_name(name)
          '"'+name.gsub(/"/,'""')+'"'
        end
      end #module SQL

      include SQL
    end # class SqlserverAdapter

    const_added(:SqlserverAdapter)
  end # module Adapters
end # module DataMapper

require DataMapper.root / 'lib' / 'dm-core' / 'adapters' / 'data_objects_adapter'

require 'do_sqlserver'

DataObjects::Sqlserver = DataObjects::SqlServer

module DataMapper
  module Adapters
    class SqlserverAdapter < DataObjectsAdapter
      module SQL #:nodoc:
        private

        # TODO: document
        # @api private
        def supports_default_values? #:nodoc:
          false
        end

        # TODO: document
        # @api private
        def regexp_operator(operand)
          'REGEXP'
        end

        # TODO: document
        # @api private
        def not_regexp_operator(operand)
          'NOT REGEXP'
        end

        # TODO: document
        # @api private
        def quote_name(name)
          '"'+name.gsub(/"/,'""')+'"'
        end
      end #module SQL

      include SQL
    end # class SqlserverAdapter

    const_added(:SqlserverAdapter)
  end # module Adapters
end # module DataMapper

Add a workaround for exceptional DataObjects::SqlServer naming
Add a workaround for exceptional DataObjects::SqlServer naming

* See also DO commit ee3a6fe.
* Most likely completely unnecessary, but the conversion of the
  snake_cased to CamelCased name, doesn't give us the chance to
  follow the DB Vendor's naming convention (so yes, actually it
  really should be SQLServerAdapter).

Signed-off-by: Alex Coles <60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcolesportfolio.com>
