Sha256: 369087332b6f948e8863a683a7dec91b4fbb512a8b714754772fca16b8be5775

Contents?: true

Size: 1.13 KB

Versions: 6

Compression:

Stored size: 1.13 KB

Contents

# frozen-string-literal: true

Sequel::Deprecation.deprecate("Sequel support for Progress", "Please consider maintaining it yourself as an external sequel adapter if you want to continue using it")

module Sequel
  module Progress
    module DatabaseMethods
      # Progress uses the :progress database type.
      def database_type
        :progress
      end
    end
  
    module DatasetMethods
      Dataset.def_sql_method(self, :select, %w'select limit distinct columns from join where group order having compounds')

      # Progress requires SQL standard datetimes
      def requires_sql_standard_datetimes?
        true
      end

      # Progress does not support INTERSECT or EXCEPT
      def supports_intersect_except?
        false
      end

      private

      # Progress uses TOP for limit, but it is only supported in Progress 10.
      # The Progress adapter targets Progress 9, so it silently ignores the option.
      def select_limit_sql(sql)
        raise(Error, "OFFSET not supported") if @opts[:offset]
        # if l = @opts[:limit]
        #   sql << " TOP "
        #   literal_append(sql, l)
        # end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
sequel-4.49.0 lib/sequel/adapters/shared/progress.rb
sequel-4.48.0 lib/sequel/adapters/shared/progress.rb
tdiary-5.0.5 vendor/bundle/gems/sequel-4.47.0/lib/sequel/adapters/shared/progress.rb
sequel-4.47.0 lib/sequel/adapters/shared/progress.rb
sequel-4.46.0 lib/sequel/adapters/shared/progress.rb
sequel-4.45.0 lib/sequel/adapters/shared/progress.rb