mergeWhere method
UPSERT: 있으면 UPDATE, 없으면 INSERT
Implementation
E mergeWhere(UpdateOrFn<E> updateOrFn, Where<E> where) {
int index = indexWhere(where);
if (index == -1) {
var inserted = updateOrFn(null);
add(inserted);
return inserted;
} else {
this[index] = updateOrFn(this[index]);
return this[index];
}
}