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
Copy file name to clipboardExpand all lines: client-sdks/advanced/attachments.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ Most demo applications use Supabase Storage as the storage provider, but the pat
61
61
|-------|-------------|
62
62
|`QUEUED_UPLOAD`| File saved locally, waiting to upload to remote storage |
63
63
|`QUEUED_DOWNLOAD`| Data model synced from another device, file needs to be downloaded |
64
-
|`SYNCED`| File exists both locally and in remote storage, fully synchronized|
64
+
|`SYNCED`| File exists both locally and in remote storage, fully synced|
65
65
|`QUEUED_DELETE`| Marked for deletion from both local and remote storage |
66
66
|`ARCHIVED`| No longer referenced in your data model, candidate for cleanup |
67
67
@@ -141,7 +141,7 @@ The queue needs to know which attachments exist in your data model. The `watchAt
141
141
-**Missing attachments** - Upload them
142
142
-**Removed attachments** - Archive them
143
143
144
-
The `watchAttachments` queries are reactive and execute whenever the watched tables change, keeping the attachment queue synchronized with your data model.
144
+
The `watchAttachments` queries are reactive and execute whenever the watched tables change, keeping the attachment queue in sync with your data model.
Copy file name to clipboardExpand all lines: client-sdks/advanced/local-only-usage.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ A caveat is that if the user never registers, this queue will keep on growing in
11
11
12
12
There are two general approaches we recommend for this:
13
13
14
-
### 1\. Local-only tables
14
+
### 1\. Local-Only Tables
15
15
16
16
<Tabs>
17
17
<Tabtitle="Flutter">
@@ -77,7 +77,7 @@ The following example implementations are available:
77
77
| Flutter To-Do List App (with Supabase) |[supabase-todolist-optional-sync](https://github.com/powersync-ja/powersync.dart/tree/main/demos/supabase-todolist-optional-sync)|
78
78
| React To-Do List App (with Supabase) |[react-supabase-todolist-optional-sync](https://github.com/powersync-ja/powersync-js/tree/main/demos/react-supabase-todolist-optional-sync)|
79
79
80
-
### 2\. Clearing the upload queue
80
+
### 2\. Clearing the Upload Queue
81
81
82
82
The upload queue can be cleared periodically (for example on every app start-up), avoiding the growth in database size over time. This can be done using:
Copy file name to clipboardExpand all lines: client-sdks/advanced/sequential-id-mapping.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ We can achieve this by creating SQL triggers.
90
90
## Create SQL Triggers
91
91
92
92
We need to create triggers that can look up the integer ID for the given UUID and vice versa.
93
-
These triggers will maintain consistency between `list_id` and `list_uuid` in the `todos` table by ensuring that they remain synchronized with the `id` and `uuid` columns in the `lists` table;
93
+
These triggers will maintain consistency between `list_id` and `list_uuid` in the `todos` table by ensuring that they remain in sync with the `id` and `uuid` columns in the `lists` table;
94
94
even if changes are made to either field.
95
95
96
96
We will create the following two triggers that cover either scenario of updating the `list_id` or `list_uuid` in the `todos` table:
Copy file name to clipboardExpand all lines: sync/advanced/sharded-databases.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,27 +20,27 @@ Where feasible, using separate PowerSync Service instances would give better per
20
20
21
21
Some specific scenarios:
22
22
23
-
#### 1\. Different tables on different databases
23
+
#### 1\. Different Tables on Different Databases
24
24
25
25
This is common when separate "services" use separate databases, but multiple tables across those databases need to be synced to the same users.
26
26
27
27
Use a single PowerSync Service instance, with a separate connection for each source database ([planned](https://roadmap.powersync.com/c/84-support-for-sharding-multiple-database-connections); this capability will be available in a future release). Use a unique [connection tag](/sync/advanced/schemas-and-connections) for each source database, allowing them to be distinguished in your [Sync Streams](/sync/streams/overview) or [Sync Rules](/sync/rules/overview).
28
28
29
-
#### 2a. All data for any single customer is contained in a single shard
29
+
#### 2a. All Data for a Single Customer Is Contained in a Single Shard
30
30
31
31
This is common when sharding per customer account / organization.
32
32
33
33
In this case, use a separate PowerSync Service instance for each database.
34
34
35
-
#### 2b. Most customer data is in a single shard, but some data is in a shared database
35
+
#### 2b. Most Customer Data Is in a Single Shard, but Some Data Is in a Shared Database
36
36
37
37
If the amount of shared data is small, still use a separate PowerSync Service instance for each database, but also add the shared database connection to each PowerSync Service instance using a separate connection tag ([planned](https://roadmap.powersync.com/c/84-support-for-sharding-multiple-database-connections); this capability will be available in a future release).
38
38
39
-
#### 2c. Data for a single customer is split across multiple shards
39
+
#### 2c. Data for a Single Customer Is Split Across Multiple Shards
40
40
41
41
This is more complicated than the other cases listed above. Please [reach out to us](/resources/contact-us) if this is your architecture.
42
42
43
-
#### 3\. Only some tables are sharded
43
+
#### 3\. Only Some Tables Are Sharded
44
44
45
45
In some cases, most tables would be on a shared server, with only a few large tables being sharded.
0 commit comments