@syncular/server-dialect-postgres 0.0.6-224 → 0.0.6-225

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +28 -9
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,10 +1,13 @@
1
1
  # @syncular/server-dialect-postgres
2
2
 
3
- PostgreSQL dialect for the Syncular server sync schema and query patterns (commit log, change log, scopes, snapshot chunks, console tables).
3
+ PostgreSQL dialect for the Syncular server sync schema and query patterns
4
+ (commit log, change log, scopes, snapshot chunks, console tables).
4
5
 
5
6
  Use this when your server is backed by Postgres.
6
- For Neon-backed runtimes, use `createNeonServerDialect()` to make that intent
7
- explicit in your server code while keeping the same sync SQL behavior.
7
+
8
+ If your runtime is backed by Neon, use `createNeonServerDialect()`. It runs the
9
+ same sync SQL behavior, but makes the intended server/runtime pairing explicit in
10
+ code and docs.
8
11
 
9
12
  ## Install
10
13
 
@@ -14,18 +17,34 @@ npm install @syncular/server-dialect-postgres
14
17
 
15
18
  ## Usage
16
19
 
20
+ ### Postgres server
21
+
17
22
  ```ts
18
23
  import { ensureSyncSchema } from '@syncular/server';
19
- import {
20
- createNeonServerDialect,
21
- createPostgresServerDialect,
22
- } from '@syncular/server-dialect-postgres';
24
+ import { createPostgresServerDialect } from '@syncular/server-dialect-postgres';
23
25
 
24
26
  const dialect = createPostgresServerDialect();
25
27
  await ensureSyncSchema(db, dialect);
28
+ ```
29
+
30
+ ### Neon-backed server
31
+
32
+ ```ts
33
+ import { ensureSyncSchema } from '@syncular/server';
34
+ import { createNeonServerDialect } from '@syncular/server-dialect-postgres';
35
+
36
+ const dialect = createNeonServerDialect();
37
+ await ensureSyncSchema(db, dialect);
38
+ ```
39
+
40
+ ### Neon-backed server with umbrella imports
26
41
 
27
- const neonDialect = createNeonServerDialect();
28
- await ensureSyncSchema(neonDb, neonDialect);
42
+ ```ts
43
+ import { ensureSyncSchema } from 'syncular/server';
44
+ import { createNeonServerDialect } from 'syncular/server-dialect-neon';
45
+
46
+ const dialect = createNeonServerDialect();
47
+ await ensureSyncSchema(db, dialect);
29
48
  ```
30
49
 
31
50
  ## Documentation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncular/server-dialect-postgres",
3
- "version": "0.0.6-224",
3
+ "version": "0.0.6-225",
4
4
  "description": "PostgreSQL dialect for the Syncular server",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Benjamin Kniffler",
@@ -40,8 +40,8 @@
40
40
  "release": "bunx syncular-publish"
41
41
  },
42
42
  "dependencies": {
43
- "@syncular/core": "0.0.6-224",
44
- "@syncular/server": "0.0.6-224"
43
+ "@syncular/core": "0.0.6-225",
44
+ "@syncular/server": "0.0.6-225"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "kysely": "^0.28.0"