Sha256: cda2d9f3e3cec65919e2a9a9c616017bc79de321eb080c9a6ceaf86637f8f88c

Contents?: true

Size: 1.16 KB

Versions: 10

Compression:

Stored size: 1.16 KB

Contents

# frozen-string-literal: true

module Sequel
  module Informix
    module DatabaseMethods
      extend Sequel::Database::ResetIdentifierMangling

      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
      FIRST = " FIRST ".freeze
      SKIP = " SKIP ".freeze

      Dataset.def_sql_method(self, :select, %w'select limit distinct columns from join where having group compounds order')

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

      private

      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

10 entries across 10 versions & 2 rubygems

Version Path
tdiary-5.0.2 vendor/bundle/gems/sequel-4.37.0/lib/sequel/adapters/shared/informix.rb
sequel-4.38.0 lib/sequel/adapters/shared/informix.rb
sequel-4.37.0 lib/sequel/adapters/shared/informix.rb
sequel-4.36.0 lib/sequel/adapters/shared/informix.rb
tdiary-5.0.1 vendor/bundle/gems/sequel-4.35.0/lib/sequel/adapters/shared/informix.rb
sequel-4.35.0 lib/sequel/adapters/shared/informix.rb
sequel-4.34.0 lib/sequel/adapters/shared/informix.rb
sequel-4.33.0 lib/sequel/adapters/shared/informix.rb
sequel-4.32.0 lib/sequel/adapters/shared/informix.rb
sequel-4.31.0 lib/sequel/adapters/shared/informix.rb