Sha256: 19fa00fb88d096564dfcbd0a7caf7b83766bf09fe9780f66798e4fdb727b5df6

Contents?: true

Size: 1.56 KB

Versions: 35

Compression:

Stored size: 1.56 KB

Contents

module ActiveRecord
  module ConnectionAdapters # :nodoc:
    module DatabaseLimits

      # Returns the maximum length of a table alias.
      def table_alias_length
        255
      end

      # Returns the maximum length of a column name.
      def column_name_length
        64
      end

      # Returns the maximum length of a table name.
      def table_name_length
        64
      end

      # Returns the maximum allowed length for an index name. This
      # limit is enforced by \Rails and is less than or equal to
      # #index_name_length. The gap between
      # #index_name_length is to allow internal \Rails
      # operations to use prefixes in temporary operations.
      def allowed_index_name_length
        index_name_length
      end

      # Returns the maximum length of an index name.
      def index_name_length
        64
      end

      # Returns the maximum number of columns per table.
      def columns_per_table
        1024
      end

      # Returns the maximum number of indexes per table.
      def indexes_per_table
        16
      end

      # Returns the maximum number of columns in a multicolumn index.
      def columns_per_multicolumn_index
        16
      end

      # Returns the maximum number of elements in an IN (x,y,z) clause.
      # nil means no limit.
      def in_clause_length
        nil
      end

      # Returns the maximum length of an SQL query.
      def sql_query_length
        1048575
      end

      # Returns maximum number of joins in a single query.
      def joins_per_query
        256
      end

    end
  end
end

Version data entries

35 entries across 35 versions & 4 rubygems

Version Path
activerecord-5.0.7.2 lib/active_record/connection_adapters/abstract/database_limits.rb
activerecord-5.0.7.1 lib/active_record/connection_adapters/abstract/database_limits.rb
activerecord-5.0.7 lib/active_record/connection_adapters/abstract/database_limits.rb
activerecord-5.0.6 lib/active_record/connection_adapters/abstract/database_limits.rb
activerecord-5.0.6.rc1 lib/active_record/connection_adapters/abstract/database_limits.rb
activerecord-5.0.5 lib/active_record/connection_adapters/abstract/database_limits.rb
activerecord-5.0.5.rc2 lib/active_record/connection_adapters/abstract/database_limits.rb
activerecord-5.0.5.rc1 lib/active_record/connection_adapters/abstract/database_limits.rb
activerecord-5.0.4 lib/active_record/connection_adapters/abstract/database_limits.rb
activerecord-5.0.4.rc1 lib/active_record/connection_adapters/abstract/database_limits.rb
activerecord-5.0.3 lib/active_record/connection_adapters/abstract/database_limits.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/database_limits.rb
activerecord-5.0.2 lib/active_record/connection_adapters/abstract/database_limits.rb
activerecord-5.0.2.rc1 lib/active_record/connection_adapters/abstract/database_limits.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/database_limits.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/database_limits.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/database_limits.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/database_limits.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/database_limits.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/database_limits.rb