aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/querying.rb
diff options
context:
space:
mode:
authorArthur Neves <arthurnn@gmail.com>2016-03-23 18:50:11 -0400
committerArthur Neves <arthurnn@gmail.com>2016-03-24 13:38:48 -0400
commitb6d1f68412054150644d8b91734654ffb1c64521 (patch)
treef5566903a43cbc46d1e988f5f8e873e12ce2e2fd /activerecord/lib/active_record/querying.rb
parentfbe6e4e306b6f73fe29e33004956e5862fd7bd86 (diff)
downloadrails-b6d1f68412054150644d8b91734654ffb1c64521.tar.gz
rails-b6d1f68412054150644d8b91734654ffb1c64521.tar.bz2
rails-b6d1f68412054150644d8b91734654ffb1c64521.zip
Move sequence value methods to Model level
`prefetch_primary_key?` and `next_sequence_value` methods live in the connection level at the moment, that make sense when you are generating the sequence from the database, in the same connection. Which is the use case today at the Oracle and Postgres adapters. However if you have an service that generates IDs, that has nothing to do with the database connection, and should not be fetched from there. Another use case, is if you want to use another connection to fetch IDs, that would not be possible with the current implementation, however when we move those methods to the model level, you can use a new connection there. Also this makes easier for gems to add behavior on those methods.
Diffstat (limited to 'activerecord/lib/active_record/querying.rb')
0 files changed, 0 insertions, 0 deletions