= private = protected
last_insert_id(sequence_name)
Returns the current ID of a table’s sequence.
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 1248 def last_insert_id(sequence_name) #:nodoc: r = exec_query("SELECT currval('#{sequence_name}')", 'SQL') Integer(r.rows.first.first) end