Sha256: 77309832f91a5c2e928c1ad758e2321b2d87d3206e0a5378d7da7af3f58fde08

Contents?: true

Size: 1.52 KB

Versions: 10

Compression:

Stored size: 1.52 KB

Contents

# frozen_string_literal: true

require "active_support/deprecation"

module ActiveRecord
  module ConnectionAdapters
    module OracleEnhanced
      module DatabaseLimits
        # maximum length of Oracle identifiers
        IDENTIFIER_MAX_LENGTH = 30

        def table_alias_length #:nodoc:
          IDENTIFIER_MAX_LENGTH
        end

        # the maximum length of a table name
        def table_name_length
          IDENTIFIER_MAX_LENGTH
        end
        deprecate :table_name_length

        # the maximum length of a column name
        def column_name_length
          IDENTIFIER_MAX_LENGTH
        end
        deprecate :column_name_length

        # Returns the maximum allowed length for an index name. This
        # limit is enforced by rails and Is less than or equal to
        # <tt>index_name_length</tt>. The gap between
        # <tt>index_name_length</tt> is to allow internal rails
        # opreations to use prefixes in temporary opreations.
        def allowed_index_name_length
          index_name_length
        end

        # the maximum length of an index name
        # supported by this database
        def index_name_length
          IDENTIFIER_MAX_LENGTH
        end

        # the maximum length of a sequence name
        def sequence_name_length
          IDENTIFIER_MAX_LENGTH
        end

        # To avoid ORA-01795: maximum number of expressions in a list is 1000
        # tell ActiveRecord to limit us to 1000 ids at a time
        def in_clause_length
          1000
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
activerecord-oracle_enhanced-adapter-6.0.6 lib/active_record/connection_adapters/oracle_enhanced/database_limits.rb
activerecord-oracle_enhanced-adapter-6.0.5 lib/active_record/connection_adapters/oracle_enhanced/database_limits.rb
activerecord-oracle_enhanced-adapter-6.0.4 lib/active_record/connection_adapters/oracle_enhanced/database_limits.rb
activerecord-oracle_enhanced-adapter-6.0.3 lib/active_record/connection_adapters/oracle_enhanced/database_limits.rb
activerecord-oracle_enhanced-adapter-6.0.2 lib/active_record/connection_adapters/oracle_enhanced/database_limits.rb
activerecord-oracle_enhanced-adapter-6.0.0 lib/active_record/connection_adapters/oracle_enhanced/database_limits.rb
activerecord-oracle_enhanced-adapter-6.0.0.rc3 lib/active_record/connection_adapters/oracle_enhanced/database_limits.rb
activerecord-oracle_enhanced-adapter-6.0.0.rc2 lib/active_record/connection_adapters/oracle_enhanced/database_limits.rb
activerecord-oracle_enhanced-adapter-6.0.0.rc1 lib/active_record/connection_adapters/oracle_enhanced/database_limits.rb
activerecord-oracle_enhanced-adapter-6.0.0.beta1 lib/active_record/connection_adapters/oracle_enhanced/database_limits.rb