Closed iros closed 11 years ago
Single row update:
ds.update({ _id : 4, prop : 23 }); // old method : ds.update(4, { prop : 23 });
Multi row update:
ds.update([{ _id : 4, prop : 23 }, { _id : 4, prop : 23 }]);
Flexible updates based on row:
ds.update( function (row) { if (row.x == 12) { row.y = 144; return row; } return false; });
Always need to return false for rows that dont' need updating so we don't run an update on all rows that haven't actually changed.
Also resolves #163
Also resolves #162
Single row update:
Multi row update:
Flexible updates based on row:
Always need to return false for rows that dont' need updating so we don't run an update on all rows that haven't actually changed.