Skip to content

Instance Method

lastAutoincrementID()

Returns the last value generated by auto-increment functionality (either the version implied by INTEGER PRIMARY KEY or that of the explicit AUTO_INCREMENT modifier) on this database.
func lastAutoincrementID() -> EventLoopFuture<Int>

Return Value

A future containing the most recently inserted rowid value.

Discussion

Only valid until the next operation is performed on the connection; watch out for races.