Sha256: 4f80fa4b28519da086174f34178e3ab34d57d25a58e398fe56ae135eb70ac560

Contents?: true

Size: 1.13 KB

Versions: 22

Compression:

Stored size: 1.13 KB

Contents

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

22 entries across 22 versions & 2 rubygems

Version Path
sequel-4.30.0 lib/sequel/adapters/shared/informix.rb
sequel-4.29.0 lib/sequel/adapters/shared/informix.rb
sequel-4.28.0 lib/sequel/adapters/shared/informix.rb
sequel-4.27.0 lib/sequel/adapters/shared/informix.rb
sequel-4.26.0 lib/sequel/adapters/shared/informix.rb
sequel-4.25.0 lib/sequel/adapters/shared/informix.rb
sequel-4.24.0 lib/sequel/adapters/shared/informix.rb
sequel-4.23.0 lib/sequel/adapters/shared/informix.rb
sequel-4.22.0 lib/sequel/adapters/shared/informix.rb
sequel-4.21.0 lib/sequel/adapters/shared/informix.rb
sequel-4.20.0 lib/sequel/adapters/shared/informix.rb
sequel-4.19.0 lib/sequel/adapters/shared/informix.rb
sequel-4.18.0 lib/sequel/adapters/shared/informix.rb
sequel-4.17.0 lib/sequel/adapters/shared/informix.rb
sequel-4.16.0 lib/sequel/adapters/shared/informix.rb
asana2flowdock-1.0.0 vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/informix.rb
sequel-4.15.0 lib/sequel/adapters/shared/informix.rb
sequel-4.14.0 lib/sequel/adapters/shared/informix.rb
sequel-4.13.0 lib/sequel/adapters/shared/informix.rb
sequel-4.12.0 lib/sequel/adapters/shared/informix.rb