You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update README and docs for patch operation and 140-test audit
- README: add patch to features table, quick start section, API
reference, security badge (140 tests), installation version
- architecture.md: add patch section with code example and
Supabase implementation details
- security_audit.md: add Category 13 (patch operation, tests
131-140), update totals to 140 tests / 13 categories
- example.dart: add Pattern C for partial update via patch
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: doc/architecture.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,19 @@ Key design decisions:
50
50
51
51
`push(table, id, data)` queues a sync entry without writing locally. Use this when your own DAO handles the local write and you just need the remote sync.
52
52
53
+
### Patch (partial update)
54
+
55
+
`push(table, id, data, operation: SyncOperation.patch)` queues a partial update. On the remote, this sends an `UPDATE ... WHERE id = ?` instead of an upsert. This avoids NOT NULL constraint failures when you only need to update a few fields on an existing row:
The `SupabaseRemoteStore` implements patch via `.update(data).eq('id', id)`. In batch mode, patches are sent individually since Supabase has no batch update API.
65
+
53
66
### remove()
54
67
55
68
`remove(table, id)` queues a `SyncOperation.delete` entry and deletes from the local store.
0 commit comments