Added Database::getLastId()