@geodedb/client 1.0.0-alpha.14 → 1.0.0-alpha.16

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.
package/README.md CHANGED
@@ -1,16 +1,18 @@
1
1
  # Geode Node.js Client
2
2
 
3
- A high-performance Node.js client library for the [Geode](https://gitlab.com/devnw/geode) graph database, implementing the ISO/IEC 39075:2024 GQL standard over QUIC + TLS 1.3.
3
+ A high-performance Node.js client library for the [Geode](https://gitlab.com/devnw/geode) graph database, implementing the ISO/IEC 39075:2024 GQL standard over QUIC or gRPC with TLS 1.3.
4
4
 
5
5
  ## Features
6
6
 
7
7
  - **Full GQL Support**: Implements ISO/IEC 39075:2024 Graph Query Language standard
8
- - **QUIC Transport**: High-performance transport with TLS 1.3 encryption
8
+ - **Dual Transport**: QUIC (default) or gRPC transport with TLS 1.3 encryption
9
+ - **Protobuf Wire Protocol**: Efficient binary serialization using Protocol Buffers
9
10
  - **Connection Pooling**: Efficient connection management for high-throughput applications
10
11
  - **Type Safety**: Full TypeScript support with comprehensive type definitions
11
12
  - **Query Builder**: Fluent API for building GQL queries programmatically
12
13
  - **Transaction Support**: Full transaction management with savepoints
13
14
  - **Async/Await**: Modern async API with proper cancellation support
15
+ - **ESM Native**: Pure ESM package for modern Node.js applications
14
16
 
15
17
  ## Installation
16
18
 
@@ -44,8 +46,15 @@ await client.close();
44
46
 
45
47
  ### DSN Format
46
48
 
49
+ > **Note**: See [`geode/docs/DSN.md`](../geode/docs/DSN.md) for the complete DSN specification.
50
+
51
+ The client supports multiple transport schemes:
52
+
47
53
  ```
48
- geode://[username:password@]host[:port][?options]
54
+ quic://[username:password@]host[:port][?options] # QUIC transport (default port: 3141)
55
+ grpc://[username:password@]host[:port][?options] # gRPC transport (default port: 50051)
56
+ geode://[username:password@]host[:port][?options] # Legacy scheme (uses QUIC)
57
+ host:port # Simple format (uses QUIC)
49
58
  ```
50
59
 
51
60
  ### Options
@@ -56,6 +65,7 @@ geode://[username:password@]host[:port][?options]
56
65
  | `hello_name` | Client name | geode-nodejs |
57
66
  | `hello_ver` | Client version | 1.0.0 |
58
67
  | `conformance` | GQL conformance level | min |
68
+ | `tls` | Enable TLS (gRPC only) | true |
59
69
  | `insecure` | Skip TLS verification (dev only) | false |
60
70
  | `ca` | Path to CA certificate | - |
61
71
  | `cert` | Path to client certificate (mTLS) | - |
@@ -66,33 +76,43 @@ geode://[username:password@]host[:port][?options]
66
76
 
67
77
  ### Environment Variables
68
78
 
69
- | Variable | Description |
70
- | ---------------- | --------------------------- |
71
- | `GEODE_HOST` | Default host |
72
- | `GEODE_PORT` | Default port |
73
- | `GEODE_TLS_CA` | Default CA certificate path |
74
- | `GEODE_USERNAME` | Default username |
75
- | `GEODE_PASSWORD` | Default password |
79
+ | Variable | Description |
80
+ | ----------------- | ------------------------------ |
81
+ | `GEODE_HOST` | Default host |
82
+ | `GEODE_PORT` | Default port |
83
+ | `GEODE_TRANSPORT` | Default transport (quic/grpc) |
84
+ | `GEODE_TLS_CA` | Default CA certificate path |
85
+ | `GEODE_USERNAME` | Default username |
86
+ | `GEODE_PASSWORD` | Default password |
76
87
 
77
88
  ### Example Configurations
78
89
 
79
90
  ```typescript
80
- // Simple connection
91
+ // Simple QUIC connection (default)
81
92
  const client = await createClient('localhost:3141');
82
93
 
94
+ // Explicit QUIC transport
95
+ const client = await createClient('quic://localhost:3141');
96
+
97
+ // gRPC transport
98
+ const client = await createClient('grpc://localhost:50051');
99
+
100
+ // gRPC without TLS (development only)
101
+ const client = await createClient('grpc://localhost:50051?tls=0');
102
+
83
103
  // With authentication
84
- const client = await createClient('geode://admin:secret@localhost:3141');
104
+ const client = await createClient('quic://admin:secret@localhost:3141');
85
105
 
86
- // With TLS
87
- const client = await createClient('geode://localhost:3141?ca=/path/to/ca.crt');
106
+ // With TLS CA certificate
107
+ const client = await createClient('quic://localhost:3141?ca=/path/to/ca.crt');
88
108
 
89
109
  // With mTLS
90
110
  const client = await createClient(
91
- 'geode://localhost:3141?ca=/path/to/ca.crt&cert=/path/to/client.crt&key=/path/to/client.key'
111
+ 'quic://localhost:3141?ca=/path/to/ca.crt&cert=/path/to/client.crt&key=/path/to/client.key'
92
112
  );
93
113
 
94
114
  // With connection pool
95
- const client = await createClient('geode://localhost:3141', {
115
+ const client = await createClient('quic://localhost:3141', {
96
116
  pooling: true,
97
117
  pool: {
98
118
  min: 2,