diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-01-11 03:16:36 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-01-15 21:01:45 +0900 |
commit | 0ed9955365634340f87e5b586e614293db35129e (patch) | |
tree | 0c742a3ae04868f4e500f51af7ae1c8e9038f2d5 /activerecord | |
parent | b2874aec105c277b6008cb8d73ffd106a12b444b (diff) | |
download | rails-0ed9955365634340f87e5b586e614293db35129e.tar.gz rails-0ed9955365634340f87e5b586e614293db35129e.tar.bz2 rails-0ed9955365634340f87e5b586e614293db35129e.zip |
`last_insert_id_value` and `last_insert_id` are unused anymore
These methods are private and unused from anywhere.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index e313a34c3a..1c20e4700f 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -690,15 +690,7 @@ module ActiveRecord end # Returns the current ID of a table's sequence. - def last_insert_id(sequence_name) #:nodoc: - Integer(last_insert_id_value(sequence_name)) - end - - def last_insert_id_value(sequence_name) - last_insert_id_result(sequence_name).rows.first.first - end - - def last_insert_id_result(sequence_name) #:nodoc: + def last_insert_id_result(sequence_name) # :nodoc: exec_query("SELECT currval('#{sequence_name}')", 'SQL') end |