Sha256: 18dcd43f563096675e5c7d6bf294b8d71c8a1689857574a196cf21f16b444026

Contents?: true

Size: 1.02 KB

Versions: 5

Compression:

Stored size: 1.02 KB

Contents

module ActiveRecord
  module ConnectionAdapters
    module SQLServer
      module DatabaseLimits
        def table_alias_length
          128
        end

        def column_name_length
          128
        end

        def table_name_length
          128
        end

        def index_name_length
          128
        end

        def columns_per_table
          1024
        end

        def indexes_per_table
          999
        end

        def columns_per_multicolumn_index
          16
        end

        def in_clause_length
          10_000
        end

        def sql_query_length
          65_536 * 4_096
        end

        def joins_per_query
          256
        end

        private

        # 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
        def bind_params_length
          2_098
        end

        def insert_rows_length
          1_000
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
activerecord-jdbcsqlserver-adapter-52.0.0 lib/active_record/connection_adapters/sqlserver/database_limits.rb
activerecord-sqlserver-adapter-5.2.1 lib/active_record/connection_adapters/sqlserver/database_limits.rb
activerecord-sqlserver-adapter-5.2.0 lib/active_record/connection_adapters/sqlserver/database_limits.rb
activerecord-sqlserver-adapter-5.2.0.rc2 lib/active_record/connection_adapters/sqlserver/database_limits.rb
activerecord-sqlserver-adapter-5.2.0.rc1 lib/active_record/connection_adapters/sqlserver/database_limits.rb