Skip to content

Commit 3b426cb

Browse files
committed
docs: update docs for the new managedDatabaseId arg for cloudsync_network_init
1 parent 951832b commit 3b426cb

File tree

8 files changed

+81
-50
lines changed

8 files changed

+81
-50
lines changed

.claude/commands/stress-test-sync-sqlitecloud.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@ Execute a stress test against the CloudSync server using multiple concurrent loc
44

55
## Prerequisites
66
- Connection string to a sqlitecloud project
7-
- HTTP sync server running (default: https://cloudsync-staging-testing.fly.dev)
87
- Built cloudsync extension (`make` to build `dist/cloudsync.dylib`)
9-
- CloudSync already enabled on the test table from the SQLiteCloud dashboard
108

119
## Test Configuration
1210

1311
### Step 1: Gather Parameters
1412

1513
Ask the user for the following configuration using a single question set:
1614

17-
1. **Sync Server URL** — propose `https://cloudsync-staging-testing.fly.dev` as default
15+
1. **CloudSync server address** — propose `https://cloudsync.sqlite.ai` as default (this is the built-in default). If the user provides a different address, save it as `CUSTOM_ADDRESS` and use `cloudsync_network_init_custom` instead of `cloudsync_network_init`.
1816
2. **SQLiteCloud connection string** — format: `sqlitecloud://<host>:<port>/<db_name>?apikey=<apikey>`. If no `<db_name>` is in the path, ask the user for one or propose `test_stress_sync`.
1917
3. **Scale** — offer these options:
2018
- Small: 1K rows, 5 iterations, 2 concurrent databases
@@ -28,14 +26,11 @@ Ask the user for the following configuration using a single question set:
2826
```
2927

3028
Save these as variables:
31-
- `SYNC_SERVER_URL`
29+
- `CUSTOM_ADDRESS` (only if the user provided a non-default address)
3230
- `CONNECTION_STRING` (the full sqlitecloud:// connection string)
3331
- `DB_NAME` (database name extracted or provided)
3432
- `HOST` (hostname extracted from connection string)
3533
- `APIKEY` (apikey extracted from connection string)
36-
- `PROJECT_ID` (first subdomain from the host)
37-
- `ORG_ID` = `org_sqlitecloud`
38-
- `NETWORK_CONFIG` = `'{"address":"<SYNC_SERVER_URL>","database":"<DB_NAME>","projectID":"<PROJECT_ID>","organizationID":"<ORG_ID>"}'`
3934
- `ROWS` (number of rows per iteration)
4035
- `ITERATIONS` (number of delete/insert/update cycles)
4136
- `NUM_DBS` (number of concurrent databases)
@@ -59,7 +54,19 @@ Connect to SQLiteCloud using `~/go/bin/sqlc` (last command must be `quit`). Note
5954
```
6055
7. Ask the user to enable CloudSync on the table from the SQLiteCloud dashboard
6156

62-
### Step 3: Get Auth Tokens (if RLS enabled)
57+
### Step 3: Get Managed Database ID
58+
59+
Now that the database and tables are created and CloudSync is enabled on the dashboard, ask the user for:
60+
61+
1. **Managed Database ID** — the `managedDatabaseId` returned by the CloudSync service. For SQLiteCloud projects, it can be obtained from the project's OffSync page on the dashboard after enabling CloudSync on the table.
62+
63+
Save as `MANAGED_DB_ID`.
64+
65+
For the network init call throughout the test, use:
66+
- Default address: `SELECT cloudsync_network_init('<MANAGED_DB_ID>');`
67+
- Custom address: `SELECT cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>');`
68+
69+
### Step 4: Get Auth Tokens (if RLS enabled)
6370

6471
Create tokens for the test users. Create as many users as needed for the number of concurrent databases (assign 2 databases per user, or 1 per user if NUM_DBS <= 2).
6572

@@ -75,7 +82,7 @@ Save each user's `token` and `userId` from the response.
7582

7683
If RLS is disabled, skip this step — tokens are not required.
7784

78-
### Step 4: Run the Concurrent Stress Test
85+
### Step 5: Run the Concurrent Stress Test
7986

8087
Create a bash script at `/tmp/stress_test_concurrent.sh` that:
8188

@@ -113,7 +120,7 @@ Create a bash script at `/tmp/stress_test_concurrent.sh` that:
113120

114121
Run the script with a 10-minute timeout.
115122

116-
### Step 5: Detailed Error Analysis
123+
### Step 6: Detailed Error Analysis
117124

118125
After the test completes, provide a detailed breakdown:
119126

@@ -122,7 +129,7 @@ After the test completes, provide a detailed breakdown:
122129
3. **Timeline analysis**: do errors cluster at specific iterations or spread evenly?
123130
4. **Read full log files** if errors are found — show the first and last 30 lines of each log with errors
124131

125-
### Step 6: Optional — Verify Data Integrity
132+
### Step 7: Optional — Verify Data Integrity
126133

127134
If the test passes (or even if some errors occurred), verify the final state:
128135

.claude/commands/test-sync-roundtrip-sqlitecloud-rls.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ Execute a full roundtrip sync test between multiple local SQLite databases and t
44

55
## Prerequisites
66
- Connection string to a sqlitecloud project
7-
- HTTP sync server running (default: https://cloudsync-staging-testing.fly.dev)
87
- Built cloudsync extension (`make` to build `dist/cloudsync.dylib`)
98

10-
### Step 1: Get Sync Server Address
9+
### Step 1: Get CloudSync Parameters
1110

12-
Ask the user for the HTTP sync server base URL. Propose `https://cloudsync-staging-testing.fly.dev` as the default. Save this as `SYNC_SERVER_URL` for use throughout the test. The full sync endpoint will be `<SYNC_SERVER_URL>/<db_name>`.
11+
Ask the user for:
12+
13+
1. **CloudSync server address** — propose `https://cloudsync.sqlite.ai` as default (this is the built-in default). If the user provides a different address, save it as `CUSTOM_ADDRESS` and use `cloudsync_network_init_custom` instead of `cloudsync_network_init`.
1314

1415
## Test Procedure
1516

@@ -51,8 +52,7 @@ Ask the user to describe the policy in plain English.
5152

5253
### Step 4: Get sqlitecloud connection string from User
5354

54-
Ask the user to provide a connection string in the form of "sqlitecloud://<host>:<port>/<db_name>?apikey=<apikey>" to be later used with the sqlitecloud cli (sqlc) with `~/go/bin/sqlc "<connection_string>"`. Save the first subdomain in the connection string address as `PROJECT_ID` for use throughout the test. Use the "org_sqlitecloud" string as `ORG_ID`.
55-
Save the configuration string `'{"address":"<SYNC_SERVER_URL>","database":"<db_name>","projectID":"<PROJECT_ID>","organizationID":"<ORG_ID>"}'` as `NETWORK_CONFIG` for use throughout the test.
55+
Ask the user to provide a connection string in the form of "sqlitecloud://<host>:<port>/<db_name>?apikey=<apikey>" to be later used with the sqlitecloud cli (sqlc) with `~/go/bin/sqlc "<connection_string>"`.
5656

5757
### Step 5: Setup SQLiteCloud with RLS
5858

@@ -104,7 +104,19 @@ Example for "user can only access their own rows":
104104
-- DELETE: User can only delete rows they own
105105
SET RLS DATABASE <db_name> TABLE <table_name> DELETE "auth_userid() = OLD.user_id"
106106
```
107-
8. Ask the user to enable the table from the sqlitecloud dashboard
107+
8. Ask the user to enable CloudSync on the table from the SQLiteCloud dashboard
108+
109+
### Step 5b: Get Managed Database ID
110+
111+
Now that the database and tables are created and CloudSync is enabled on the dashboard, ask the user for:
112+
113+
1. **Managed Database ID** — the `managedDatabaseId` returned by the CloudSync service. For SQLiteCloud projects, it can be obtained from the project's OffSync page on the dashboard after enabling CloudSync on the table.
114+
115+
Save as `MANAGED_DB_ID`.
116+
117+
For the network init call throughout the test, use:
118+
- Default address: `SELECT cloudsync_network_init('<MANAGED_DB_ID>');`
119+
- Custom address: `SELECT cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>');`
108120

109121
<!-- Enable CloudSync on selected tables
110122
@@ -178,7 +190,7 @@ $SQLITE_BIN /tmp/sync_test_user1_a.db
178190
.load dist/cloudsync.dylib
179191
<CREATE_TABLE_query_sqlite>
180192
SELECT cloudsync_init('<table_name>');
181-
SELECT cloudsync_network_init('<NETWORK_CONFIG>');
193+
SELECT cloudsync_network_init('<MANAGED_DB_ID>'); -- or cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>') if using a non-default address
182194
SELECT cloudsync_network_set_token('<TOKEN_USER1>');
183195
```
184196

@@ -190,7 +202,7 @@ $SQLITE_BIN /tmp/sync_test_user1_b.db
190202
.load dist/cloudsync.dylib
191203
<CREATE_TABLE_query_sqlite>
192204
SELECT cloudsync_init('<table_name>');
193-
SELECT cloudsync_network_init('<NETWORK_CONFIG>');
205+
SELECT cloudsync_network_init('<MANAGED_DB_ID>'); -- or cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>') if using a non-default address
194206
SELECT cloudsync_network_set_token('<TOKEN_USER1>');
195207
```
196208

@@ -202,7 +214,7 @@ $SQLITE_BIN /tmp/sync_test_user2_a.db
202214
.load dist/cloudsync.dylib
203215
<CREATE_TABLE_query_sqlite>
204216
SELECT cloudsync_init('<table_name>');
205-
SELECT cloudsync_network_init('<NETWORK_CONFIG>');
217+
SELECT cloudsync_network_init('<MANAGED_DB_ID>'); -- or cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>') if using a non-default address
206218
SELECT cloudsync_network_set_token('<TOKEN_USER2>');
207219
```
208220

@@ -214,7 +226,7 @@ $SQLITE_BIN /tmp/sync_test_user2_b.db
214226
.load dist/cloudsync.dylib
215227
<CREATE_TABLE_query_sqlite>
216228
SELECT cloudsync_init('<table_name>');
217-
SELECT cloudsync_network_init('<NETWORK_CONFIG>');
229+
SELECT cloudsync_network_init('<MANAGED_DB_ID>'); -- or cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>') if using a non-default address
218230
SELECT cloudsync_network_set_token('<TOKEN_USER2>');
219231
```
220232

@@ -417,14 +429,14 @@ user_id UUID NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'
417429
```sql
418430
-- WRONG: Separate sessions won't work
419431
-- Session 1:
420-
SELECT cloudsync_network_init('<NETWORK_CONFIG>');
432+
SELECT cloudsync_network_init('<MANAGED_DB_ID>'); -- or cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>') if using a non-default address
421433
SELECT cloudsync_network_set_token('...');
422434
-- Session 2:
423435
SELECT cloudsync_network_send_changes(); -- ERROR: No URL set
424436

425437
-- CORRECT: All network operations in the same session
426438
.load dist/cloudsync.dylib
427-
SELECT cloudsync_network_init('<NETWORK_CONFIG>');
439+
SELECT cloudsync_network_init('<MANAGED_DB_ID>'); -- or cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>') if using a non-default address
428440
SELECT cloudsync_network_set_token('...');
429441
SELECT cloudsync_network_send_changes();
430442
SELECT cloudsync_terminate();

.claude/commands/test-sync-roundtrip-supabase-rls.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Execute a full roundtrip sync test between multiple local SQLite databases and t
44

55
## Prerequisites
66
- Supabase instance running (local Docker or remote)
7-
- HTTP sync server running (default: https://cloudsync-staging-testing.fly.dev)
87
- Built cloudsync extension (`make` to build `dist/cloudsync.dylib`)
98

109
## Test Procedure
@@ -13,7 +12,7 @@ Execute a full roundtrip sync test between multiple local SQLite databases and t
1312

1413
Ask the user for the following parameters:
1514

16-
1. **Sync server URL**: Propose `https://cloudsync-staging-testing.fly.dev` as default. Save as `SYNC_SERVER_URL`. The full sync endpoint will be `<SYNC_SERVER_URL>/postgres`.
15+
1. **CloudSync server address** — propose `https://cloudsync.sqlite.ai` as default (this is the built-in default). If the user provides a different address, save it as `CUSTOM_ADDRESS` and use `cloudsync_network_init_custom` instead of `cloudsync_network_init`.
1716

1817
2. **PostgreSQL connection string**: Propose `postgresql://supabase_admin:postgres@127.0.0.1:54322/postgres` as default. Save as `PG_CONN`. Use this for all `psql` connections throughout the test.
1918

@@ -154,6 +153,16 @@ Inside psql:
154153
9. Initialize cloudsync: `SELECT cloudsync_init('<table_name>');`
155154
10. Insert some initial test data (optional, can be done via SQLite clients)
156155

156+
### Step 5b: Get Managed Database ID
157+
158+
Now that the database and tables are created and cloudsync is initialized, ask the user for:
159+
160+
1. **Managed Database ID** — the `managedDatabaseId` returned by the CloudSync service. Save as `MANAGED_DB_ID`.
161+
162+
For the network init call throughout the test, use:
163+
- Default address: `SELECT cloudsync_network_init('<MANAGED_DB_ID>');`
164+
- Custom address: `SELECT cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>');`
165+
157166
### Step 6: Get JWT Tokens for Two Users
158167

159168
Get JWT tokens for both test users by running the token script twice:
@@ -191,7 +200,7 @@ $SQLITE_BIN /tmp/sync_test_user1_a.db
191200
.load dist/cloudsync.dylib
192201
<CREATE_TABLE_query_sqlite>
193202
SELECT cloudsync_init('<table_name>');
194-
SELECT cloudsync_network_init('<SYNC_SERVER_URL>/postgres');
203+
SELECT cloudsync_network_init('<MANAGED_DB_ID>'); -- or cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>') if using a non-default address
195204
SELECT cloudsync_network_set_token('<JWT_USER1>');
196205
```
197206

@@ -203,7 +212,7 @@ $SQLITE_BIN /tmp/sync_test_user1_b.db
203212
.load dist/cloudsync.dylib
204213
<CREATE_TABLE_query_sqlite>
205214
SELECT cloudsync_init('<table_name>');
206-
SELECT cloudsync_network_init('<SYNC_SERVER_URL>/postgres');
215+
SELECT cloudsync_network_init('<MANAGED_DB_ID>'); -- or cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>') if using a non-default address
207216
SELECT cloudsync_network_set_token('<JWT_USER1>');
208217
```
209218

@@ -215,7 +224,7 @@ $SQLITE_BIN /tmp/sync_test_user2_a.db
215224
.load dist/cloudsync.dylib
216225
<CREATE_TABLE_query_sqlite>
217226
SELECT cloudsync_init('<table_name>');
218-
SELECT cloudsync_network_init('<SYNC_SERVER_URL>/postgres');
227+
SELECT cloudsync_network_init('<MANAGED_DB_ID>'); -- or cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>') if using a non-default address
219228
SELECT cloudsync_network_set_token('<JWT_USER2>');
220229
```
221230

@@ -227,7 +236,7 @@ $SQLITE_BIN /tmp/sync_test_user2_b.db
227236
.load dist/cloudsync.dylib
228237
<CREATE_TABLE_query_sqlite>
229238
SELECT cloudsync_init('<table_name>');
230-
SELECT cloudsync_network_init('<SYNC_SERVER_URL>/postgres');
239+
SELECT cloudsync_network_init('<MANAGED_DB_ID>'); -- or cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>') if using a non-default address
231240
SELECT cloudsync_network_set_token('<JWT_USER2>');
232241
```
233242

@@ -485,14 +494,14 @@ Ensure column types are compatible between SQLite and PostgreSQL:
485494
```sql
486495
-- WRONG: Separate sessions won't work
487496
-- Session 1:
488-
SELECT cloudsync_network_init('<SYNC_SERVER_URL>/postgres');
497+
SELECT cloudsync_network_init('<MANAGED_DB_ID>'); -- or cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>') if using a non-default address
489498
SELECT cloudsync_network_set_token('...');
490499
-- Session 2:
491500
SELECT cloudsync_network_send_changes(); -- ERROR: No URL set
492501

493502
-- CORRECT: All network operations in the same session
494503
.load dist/cloudsync.dylib
495-
SELECT cloudsync_network_init('<SYNC_SERVER_URL>/postgres');
504+
SELECT cloudsync_network_init('<MANAGED_DB_ID>'); -- or cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>') if using a non-default address
496505
SELECT cloudsync_network_set_token('...');
497506
SELECT cloudsync_network_send_changes();
498507
SELECT cloudsync_terminate();

.claude/commands/test-sync-roundtrip-supabase.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Execute a full roundtrip sync test between a local SQLite database and the local
44

55
## Prerequisites
66
- Supabase instance running (local Docker or remote)
7-
- HTTP sync server running (default: https://cloudsync-staging-testing.fly.dev)
87
- Built cloudsync extension (`make` to build `dist/cloudsync.dylib`)
98

109
## Test Procedure
@@ -13,14 +12,15 @@ Execute a full roundtrip sync test between a local SQLite database and the local
1312

1413
Ask the user for the following parameters:
1514

16-
1. **Sync server URL**: Propose `https://cloudsync-staging-testing.fly.dev` as default. Save as `SYNC_SERVER_URL`. The full sync endpoint will be `<SYNC_SERVER_URL>/postgres`.
15+
1. **CloudSync server address** — propose `https://cloudsync.sqlite.ai` as default (this is the built-in default). If the user provides a different address, save it as `CUSTOM_ADDRESS` and use `cloudsync_network_init_custom` instead of `cloudsync_network_init`.
1716

1817
2. **PostgreSQL connection string**: Propose `postgresql://supabase_admin:postgres@127.0.0.1:54322/postgres` as default. Save as `PG_CONN`. Use this for all `psql` connections throughout the test.
1918

2019
3. **Supabase API key** (used for JWT token generation): Propose `sb_secret_N7UND0UgjKTVK-Uodkm0Hg_xSvEMPvz` as default. Save as `SUPABASE_APIKEY`.
2120

2221
Derive `AUTH_URL` from the PostgreSQL connection string by extracting the host and using port `54321` (Supabase GoTrue). For example, if `PG_CONN` is `postgresql://user:pass@10.0.0.5:54322/postgres`, then `AUTH_URL` is `http://10.0.0.5:54321`. For `127.0.0.1`, use `http://127.0.0.1:54321`.
2322

23+
2424
### Step 2: Get DDL from User
2525

2626
Ask the user to provide a DDL query for the table(s) to test. It can be in PostgreSQL or SQLite format. Offer the following options:
@@ -95,6 +95,16 @@ Inside psql:
9595
5. Initialize cloudsync: `SELECT cloudsync_init('<table_name>');`
9696
6. Insert some test data into the table
9797

98+
### Step 5b: Get Managed Database ID
99+
100+
Now that the database and tables are created and cloudsync is initialized, ask the user for:
101+
102+
1. **Managed Database ID** — the `managedDatabaseId` returned by the CloudSync service. Save as `MANAGED_DB_ID`.
103+
104+
For the network init call throughout the test, use:
105+
- Default address: `SELECT cloudsync_network_init('<MANAGED_DB_ID>');`
106+
- Custom address: `SELECT cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>');`
107+
98108
### Step 6: Setup SQLite
99109

100110
Create a temporary SQLite database using the Homebrew version (IMPORTANT: system sqlite3 cannot load extensions):
@@ -112,7 +122,7 @@ Inside sqlite3:
112122
-- Create table with SQLite DDL
113123
<CREATE_TABLE_query>
114124
SELECT cloudsync_init('<table_name>');
115-
SELECT cloudsync_network_init('<SYNC_SERVER_URL>/postgres');
125+
SELECT cloudsync_network_init('<MANAGED_DB_ID>'); -- or cloudsync_network_init_custom('<CUSTOM_ADDRESS>', '<MANAGED_DB_ID>') if using a non-default address
116126
SELECT cloudsync_network_set_token('<jwt_token>');
117127
-- Insert test data (different from PostgreSQL to test merge)
118128
<INSERT_statements>

API.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This document provides a reference for the SQLite functions provided by the `sql
2020
- [`cloudsync_begin_alter()`](#cloudsync_begin_altertable_name)
2121
- [`cloudsync_commit_alter()`](#cloudsync_commit_altertable_name)
2222
- [Network Functions](#network-functions)
23-
- [`cloudsync_network_init()`](#cloudsync_network_initconnection_string)
23+
- [`cloudsync_network_init()`](#cloudsync_network_initmanageddatabaseid)
2424
- [`cloudsync_network_cleanup()`](#cloudsync_network_cleanup)
2525
- [`cloudsync_network_set_token()`](#cloudsync_network_set_tokentoken)
2626
- [`cloudsync_network_set_apikey()`](#cloudsync_network_set_apikeyapikey)
@@ -287,20 +287,20 @@ SELECT cloudsync_commit_alter('my_table');
287287

288288
## Network Functions
289289

290-
### `cloudsync_network_init(connection_string)`
290+
### `cloudsync_network_init(managedDatabaseId)`
291291

292-
**Description:** Initializes the `sqlite-sync` network component. This function parses the connection string to configure change checking and upload endpoints, and initializes the cURL library.
292+
**Description:** Initializes the `sqlite-sync` network component. This function configures the endpoints for the CloudSync service and initializes the cURL library.
293293

294294
**Parameters:**
295295

296-
- `connection_string` (TEXT): The connection string for the remote synchronization server. The format is `sqlitecloud://<host>:<port>/<database>?<options>`.
296+
- `managedDatabaseId` (TEXT): The managed database identifier returned by the CloudSync service when a new database is registered for sync. For SQLiteCloud projects, this value can be obtained from the project's OffSync page on the dashboard.
297297

298298
**Returns:** None.
299299

300300
**Example:**
301301

302302
```sql
303-
SELECT cloudsync_network_init('<projectid>.sqlite.cloud/<db>.sqlite');
303+
SELECT cloudsync_network_init('your-managed-database-id');
304304
```
305305

306306
---

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1313

1414
### Changed
1515

16-
- **BREAKING: `cloudsync_network_init` now accepts JSON instead of a URL string.** The new format adds `projectID` and `organizationID` fields for multi-organization CloudSync support. An `X-CloudSync-Org` header is automatically sent with every request.
16+
- **BREAKING: `cloudsync_network_init` now accepts a `managedDatabaseId` instead of a connection string.** The `managedDatabaseId` is returned by the CloudSync service when a new database is registered for sync. For SQLiteCloud projects, it can be obtained from the project's OffSync page on the dashboard.
1717

1818
Before:
1919
```sql
@@ -22,7 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
2222

2323
After:
2424
```sql
25-
SELECT cloudsync_network_init('{"address":"https://myproject.sqlite.cloud:443","database":"mydb.sqlite","projectID":"abc123","organizationID":"org456","apikey":"KEY"}');
25+
SELECT cloudsync_network_init('your-managed-database-id');
2626
```
2727

2828
- **BREAKING: Sync functions now return structured JSON.** `cloudsync_network_send_changes`, `cloudsync_network_check_changes`, and `cloudsync_network_sync` return a JSON object instead of a plain integer. This provides richer status information including sync state, version numbers, row counts, and affected table names.

0 commit comments

Comments
 (0)