forked from rsim/oracle-enhanced
-
Notifications
You must be signed in to change notification settings - Fork 2
/
database_limits.rb
47 lines (39 loc) · 1.14 KB
/
database_limits.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 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
# 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