aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/invalid_connection_test.rb
diff options
context:
space:
mode:
authorYasuo Honda <yasuo.honda@gmail.com>2015-05-29 16:45:59 +0000
committerYasuo Honda <yasuo.honda@gmail.com>2015-06-01 12:23:20 +0000
commita9e6e6e07aa5f433e0f66179b22c1c9575685727 (patch)
tree94aaf8b8125aded6a2b5c2e17adaee52ca259121 /activerecord/test/cases/invalid_connection_test.rb
parent2db8414102d1ccbaf2f293e183422c0801d4bccd (diff)
downloadrails-a9e6e6e07aa5f433e0f66179b22c1c9575685727.tar.gz
rails-a9e6e6e07aa5f433e0f66179b22c1c9575685727.tar.bz2
rails-a9e6e6e07aa5f433e0f66179b22c1c9575685727.zip
Map :bigint as NUMBER(19) sql_type by using `:limit => 19` for Oracle
since NUMBER(8) is not enough to store the maximum number of bigint. Oracle NUMBER(p,0) as handled as integer because there is no dedicated integer sql data type exist in Oracle database. Also NUMBER(p,s) precision can take up to 38. p means the number of digits, not the byte length. bigint type needs 19 digits as follows. $ irb 2.2.2 :001 > limit = 8 => 8 2.2.2 :002 > maxvalue_of_bigint = 1 << ( limit * 8 - 1) => 9223372036854775808 2.2.2 :003 > puts maxvalue_of_bigint.to_s.length 19 => nil 2.2.2 :004 >
Diffstat (limited to 'activerecord/test/cases/invalid_connection_test.rb')
0 files changed, 0 insertions, 0 deletions