Sha256: f01de903b5aafb6ae91f02d383e0efbcdbbe94d212a08ec860cb07f6c99a89d3

Contents?: true

Size: 1.16 KB

Versions: 20

Compression:

Stored size: 1.16 KB

Contents

module Sequel
  module Informix
    module DatabaseMethods
      TEMPORARY = 'TEMP '.freeze

      # Informix uses the :informix database type
      def database_type
        :informix
      end

      private

      # Informix has issues with quoted identifiers, so
      # turn off database quoting by default.
      def quote_identifiers_default
        false
      end

      # SQL fragment for showing a table is temporary
      def temporary_table_sql
        TEMPORARY
      end
    end
    
    module DatasetMethods
      SELECT_CLAUSE_METHODS = Dataset.clause_methods(:select, %w'select limit distinct columns from join where having group compounds order')
      FIRST = " FIRST ".freeze
      SKIP = " SKIP ".freeze

      private

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

      def select_clause_methods
        SELECT_CLAUSE_METHODS
      end

      def select_limit_sql(sql)
        if o = @opts[:offset]
          sql << SKIP
          literal_append(sql, o)
        end
        if l = @opts[:limit]
          sql << FIRST
          literal_append(sql, l)
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
sequel-3.47.0 lib/sequel/adapters/shared/informix.rb
sequel-3.46.0 lib/sequel/adapters/shared/informix.rb
sequel-3.45.0 lib/sequel/adapters/shared/informix.rb
sequel-3.44.0 lib/sequel/adapters/shared/informix.rb
sequel-3.43.0 lib/sequel/adapters/shared/informix.rb
sequel-3.42.0 lib/sequel/adapters/shared/informix.rb
sequel-3.41.0 lib/sequel/adapters/shared/informix.rb
sequel-3.40.0 lib/sequel/adapters/shared/informix.rb
sequel-3.39.0 lib/sequel/adapters/shared/informix.rb
sequel-3.38.0 lib/sequel/adapters/shared/informix.rb
sequel-3.37.0 lib/sequel/adapters/shared/informix.rb
sequel-3.36.1 lib/sequel/adapters/shared/informix.rb
sequel-3.36.0 lib/sequel/adapters/shared/informix.rb
sequel-3.35.0 lib/sequel/adapters/shared/informix.rb
sequel-3.34.1 lib/sequel/adapters/shared/informix.rb
sequel-3.34.0 lib/sequel/adapters/shared/informix.rb
sequel-3.33.0 lib/sequel/adapters/shared/informix.rb
sequel-3.32.0 lib/sequel/adapters/shared/informix.rb
sequel-3.31.0 lib/sequel/adapters/shared/informix.rb
sequel-3.30.0 lib/sequel/adapters/shared/informix.rb