Module: ActiveRecord::ConnectionAdapters::DatabaseLimits

Included in:
AbstractAdapter
Defined in:
activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb

Instance Method Summary collapse

Instance Method Details

#allowed_index_name_lengthObject

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.


32
33
34
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb', line 32

def allowed_index_name_length
  index_name_length
end

#column_name_lengthObject

Returns the maximum length of a column name.


16
17
18
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb', line 16

def column_name_length
  max_identifier_length
end

#columns_per_multicolumn_indexObject

Returns the maximum number of columns in a multicolumn index.


54
55
56
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb', line 54

def columns_per_multicolumn_index
  16
end

#columns_per_tableObject

Returns the maximum number of columns per table.


42
43
44
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb', line 42

def columns_per_table
  1024
end

#in_clause_lengthObject

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


61
62
63
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb', line 61

def in_clause_length
  nil
end

#index_name_lengthObject

Returns the maximum length of an index name.


37
38
39
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb', line 37

def index_name_length
  max_identifier_length
end

#indexes_per_tableObject

Returns the maximum number of indexes per table.


48
49
50
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb', line 48

def indexes_per_table
  16
end

#joins_per_queryObject

Returns maximum number of joins in a single query.


72
73
74
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb', line 72

def joins_per_query
  256
end

#max_identifier_lengthObject

:nodoc:


6
7
8
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb', line 6

def max_identifier_length # :nodoc:
  64
end

#sql_query_lengthObject

Returns the maximum length of an SQL query.


66
67
68
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb', line 66

def sql_query_length
  1048575
end

#table_alias_lengthObject

Returns the maximum length of a table alias.


11
12
13
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb', line 11

def table_alias_length
  max_identifier_length
end

#table_name_lengthObject

Returns the maximum length of a table name.


22
23
24
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb', line 22

def table_name_length
  max_identifier_length
end