File tree Expand file tree Collapse file tree 4 files changed +38
-40
lines changed
self-hosted/base/powersync Expand file tree Collapse file tree 4 files changed +38
-40
lines changed Original file line number Diff line number Diff line change 2020 "@powersync/management-types" : " 0.0.1" ,
2121 "@powersync/service-sync-rules" : " ^0.30.0" ,
2222 "@powersync/service-types" : " ^0.13.3" ,
23- "@powersync-community/sync-config-rewriter" : " 0.1.0 " ,
23+ "@powersync-community/sync-config-rewriter" : " ^ 0.1.1 " ,
2424 "jose" : " ^6.1.3" ,
2525 "lodash" : " ^4.17.23" ,
2626 "fastify" : " ^5.0.0" ,
Original file line number Diff line number Diff line change 1- # See Documentation for more information:
2- # https://docs.powersync.com/usage/sync-rules
3-
4- # See https://docs.powersync.com/usage/sync-rules/compatibility for config:edition details
1+ # See https://docs.powersync.com/sync/advanced/compatibility
52config :
63 edition : 2
4+ sync_config_compiler : true
75
8- # Define sync config to control which data is synced to each user
9- # Docs: https://docs.powersync.com/usage/ sync-rules
10- bucket_definitions :
6+ # Define Sync Streams to control which data is synced to each user
7+ # Docs: https://docs.powersync.com/sync/streams/overview
8+ streams :
119 global :
12- # Sync config without parameter queries will sync to all users
13- data :
14- # Sync all rows
10+ # Streams without parameters sync the same data to all users
11+ auto_subscribe : true
12+ queries :
13+ # Sync all rows
1514 - SELECT * FROM mytable
16- # Only sync some rows
15+ # Only sync some rows
1716 - SELECT * FROM mytable WHERE mycolumn = false
18- # Wildcards can be used, useful in development to quickly sync all tables
19- # - SELECT * FROM "%"
17+ # Wildcards can be used, useful in development to quickly sync all tables
18+ # - SELECT * FROM "%"
19+
2020 by_user :
21- # Only sync rows belonging to the user, using fields from the auth token
22- parameters : SELECT request.user_id() as user_id
23- data :
24- - SELECT * FROM mytable WHERE mytable.user_id = bucket.user_id
21+ # Only sync rows belonging to the user, using fields from the auth token
22+ auto_subscribe : true
23+ query : SELECT * FROM mytable WHERE mytable.user_id = auth.user_id()
Original file line number Diff line number Diff line change 1- # See Documentation for more information:
2- # https://docs.powersync.com/usage/sync-rules
3-
4- # See https://docs.powersync.com/usage/sync-rules/compatibility for config:edition details
1+ # See https://docs.powersync.com/sync/advanced/compatibility
52config :
63 edition : 2
4+ sync_config_compiler : true
75
8- # Define sync config to control which data is synced to each user
9- # Docs: https://docs.powersync.com/usage/ sync-rules
10- bucket_definitions :
6+ # Define Sync Streams to control which data is synced to each user
7+ # Docs: https://docs.powersync.com/sync/streams/overview
8+ streams :
119 global :
12- # Sync config without parameter queries will sync to all users
13- data :
14- # Sync all rows
10+ # Streams without parameters sync the same data to all users
11+ auto_subscribe : true
12+ queries :
13+ # Sync all rows
1514 - SELECT * FROM mytable
16- # Only sync some rows
15+ # Only sync some rows
1716 - SELECT * FROM mytable WHERE mycolumn = false
18- # Wildcards can be used, useful in development to quickly sync all tables
19- # - SELECT * FROM "%"
17+ # Wildcards can be used, useful in development to quickly sync all tables
18+ # - SELECT * FROM "%"
19+
2020 by_user :
21- # Only sync rows belonging to the user, using fields from the auth token
22- parameters : SELECT request.user_id() as user_id
23- data :
24- - SELECT * FROM mytable WHERE mytable.user_id = bucket.user_id
21+ # Only sync rows belonging to the user, using fields from the auth token
22+ auto_subscribe : true
23+ query : SELECT * FROM mytable WHERE mytable.user_id = auth.user_id()
You can’t perform that action at this time.
0 commit comments