Sha256: 71b03c11f6d43ad825ef78b6060428ab8a468975dbe5c0d616cd571517d97cc9

Contents?: true

Size: 789 Bytes

Versions: 3

Compression:

Stored size: 789 Bytes

Contents

module Sequel
  module Progress
    module DatabaseMethods

      def dataset(opts = nil)
        ds = super
        ds.extend(DatasetMethods)
        ds
      end
    end
  
    module DatasetMethods
      include Dataset::UnsupportedIntersectExcept

      SELECT_CLAUSE_ORDER = %w'limit distinct columns from join where group order having compounds'.freeze

      private

      def select_clause_order
        SELECT_CLAUSE_ORDER
      end

      # 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, opts)
        raise(Error, "OFFSET not supported") if opts[:offset]
        #sql << " TOP #{opts[:limit]}" if opts[:limit]
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
colincasey-sequel-2.10.1 lib/sequel_core/adapters/shared/progress.rb
sequel-2.10.0 lib/sequel_core/adapters/shared/progress.rb
sequel-2.9.0 lib/sequel_core/adapters/shared/progress.rb