Db.lastInsertId
Db.lastInsertId($sequenceName='') -> number
Description
Returns the ID of the last inserted row.
If using PostgreSql, you must pass in a sequence name.
NoteThis might not return a meaningful or consistent results across different kinds of databases.
Db.insertRow('users', { userName: 'theo' }) Db.lastInsertId() //= Ex: 123