Method: ActiveRecord::ConnectionAdapters::IBM_IDS#last_generated_id
- Defined in:
- lib/active_record/connection_adapters/ibm_db_adapter.rb
#last_generated_id(stmt) ⇒ Object
Method that returns the last automatically generated ID on the given @connection. This method is required by the insert method. IDS returns the last generated serial value in the SQLCA unlike DB2 where the generated value has to be retrieved using the IDENTITY_VAL_LOCAL function. We used the “stmt” parameter to identify the statement resource from which to get the last generated value
3655 3656 3657 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 3655 def last_generated_id(stmt) IBM_DB.get_last_serial_value(stmt) end |