Commit cb2934e
committed
sqlite3 adapter returns integer value which used to be string
`to_i` was added for SQLite3 adapter which did not handle number
but sqlite3 gem already supports it then `to_i` is unnecessary.
else condition is kept for adapters which return string,
i.e. mysql(not mysql2) and sqlserver.
Renamed `test_cache_does_not_wrap_string_results_in_arrays`
to `test_cache_does_not_wrap_results_in_arrays` to explain the
current behavior. most of adapters return integer, not only string.
* Refer these commits:
"future proofing the sqlite3 adapter code"
rails@beda2d4
"Refactor calculation test to remove unneeded SQLite special case."
rails@47d568e
"no need to to_i, sqlite does that for us"
rails@6cf44a11 parent 806f96c commit cb2934e
File tree
2 files changed
+4
-9
lines changed- activerecord/test/cases
2 files changed
+4
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
522 | | - | |
| 521 | + | |
523 | 522 | | |
524 | 523 | | |
525 | 524 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
306 | 306 | | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
| 307 | + | |
| 308 | + | |
313 | 309 | | |
314 | 310 | | |
315 | 311 | | |
| |||
0 commit comments