module ActiveRecord::ConnectionAdapters::SQLServer::DatabaseLimits

Public Instance Methods

column_name_length() click to toggle source
# File lib/active_record/connection_adapters/sqlserver/database_limits.rb, line 9
def column_name_length
  128
end
columns_per_multicolumn_index() click to toggle source
# File lib/active_record/connection_adapters/sqlserver/database_limits.rb, line 29
def columns_per_multicolumn_index
  16
end
columns_per_table() click to toggle source
# File lib/active_record/connection_adapters/sqlserver/database_limits.rb, line 21
def columns_per_table
  1024
end
in_clause_length() click to toggle source
# File lib/active_record/connection_adapters/sqlserver/database_limits.rb, line 33
def in_clause_length
  10_000
end
index_name_length() click to toggle source
# File lib/active_record/connection_adapters/sqlserver/database_limits.rb, line 17
def index_name_length
  128
end
indexes_per_table() click to toggle source
# File lib/active_record/connection_adapters/sqlserver/database_limits.rb, line 25
def indexes_per_table
  999
end
joins_per_query() click to toggle source
# File lib/active_record/connection_adapters/sqlserver/database_limits.rb, line 41
def joins_per_query
  256
end
sql_query_length() click to toggle source
# File lib/active_record/connection_adapters/sqlserver/database_limits.rb, line 37
def sql_query_length
  65_536 * 4_096
end
table_alias_length() click to toggle source
# File lib/active_record/connection_adapters/sqlserver/database_limits.rb, line 5
def table_alias_length
  128
end
table_name_length() click to toggle source
# File lib/active_record/connection_adapters/sqlserver/database_limits.rb, line 13
def table_name_length
  128
end

Private Instance Methods

bind_params_length() click to toggle source

The max number of binds is 2100, but because sp_executesql takes the first 2 params as the query string and the list of types, we have only 2098 spaces left

# File lib/active_record/connection_adapters/sqlserver/database_limits.rb, line 50
def bind_params_length
  2_098
end
insert_rows_length() click to toggle source
# File lib/active_record/connection_adapters/sqlserver/database_limits.rb, line 54
def insert_rows_length
  1_000
end