File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -54,12 +54,6 @@ To also transfer local writes to PowerSync, you need to
54
54
1 . Create triggers on your Room tables to insert into ` ps_crud ` (see the
55
55
[ PowerSync documentation on raw tables] ( https://docs.powersync.com/usage/use-case-examples/raw-tables#capture-local-writes-with-triggers )
56
56
for details).
57
- 2 . Listen for Room changes and invoke a helper method to transfer them to PowerSync:
58
- ``` Kotlin
59
- yourRoomDatabase.getCoroutineScope().launch {
60
- // list all your tables here
61
- yourRoomDatabase.invalidationTracker.createFlow(" users" , " groups" , /* ...*/ ).collect {
62
- pool.transferRoomUpdatesToPowerSync()
63
- }
64
- }
65
- ```
57
+ 2 . Pass the schema as a second parameter to the ` RoomConnectionPool ` constructor. This will make the
58
+ pool notify PowerSync on Room writes for every raw table mentioned in the schema.
59
+ Alternatively, call ` transferPendingRoomUpdatesToPowerSync ` after writes in Room.
You can’t perform that action at this time.
0 commit comments