Is there a way to get last updated row id, as what we can get from insert operation?
int row_id = -1
// fx_watchlist_id is having constraint unique (fx_watchlist_id) on conflict.
// So, we are pretty sure maximum updated row will be 1
int count = database.update(TABLE_TIMESTAMP, values, "fx_watchlist_id = ?", new String[]{Long.toString(fxWatchlistId)});
if (count <= 0) {
row_id = database.insert(TABLE_TIMESTAMP, null, values);
} else {
// Is there a way to retrieve last updated row id, without perform select?
row_id = ...
}
return row_id;