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
docs: align SQL DDL syntax, HTTP routes, and protocol handshake with current API
Update all examples and reference tables to reflect the current engine
selector syntax (`WITH (engine='...')` instead of `TYPE X`), the `/v1/`
route prefix for all data endpoints, versioned Content-Type headers, the
corrected health probe paths (`/healthz`, `/health/live`, `/health/ready`),
and the native protocol handshake/limits/capabilities documentation.
Also adds a PostgreSQL compatibility section to the SQL overview, expands
the vector-search page with hybrid and multi-vector query patterns, and
documents the DDL constraint policy.
Copy file name to clipboardExpand all lines: docs/architecture/overview.rdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ If code needs to cross a plane boundary, it goes through the SPSC bridge (Contro
39
39
**SQL path** — All user-facing interfaces accept SQL. The Control Plane parses via sqlparser, plans via EngineRules, and dispatches a `SqlPlan` through the SPSC bridge to the Data Plane.
Full Prometheus query engine. Point Grafana at this URL as a Prometheus data source.
@@ -57,4 +59,8 @@ GET /v1/streams/{stream}/poll?group={group} # Long-poll
57
59
58
60
### WebSocket
59
61
60
-
`/ws` endpoint for JSON-RPC: SQL execution, LIVE SELECT delivery, session reconnect.
62
+
`/v1/ws` endpoint for JSON-RPC: SQL execution, LIVE SELECT delivery, session reconnect.
63
+
64
+
## Versioning
65
+
66
+
All non-probe routes are under the `/v1/` prefix. JSON responses carry `Content-Type: application/vnd.nodedb.v1+json; charset=utf-8`. Clients may opt into version negotiation by sending `Accept: application/vnd.nodedb.v1+json`; sending only an unsupported `application/vnd.nodedb.vN+json` returns `406 Not Acceptable`. Probe routes (`/healthz`, `/health/*`, `/metrics`) are unversioned and always reachable, including during startup.
Copy file name to clipboardExpand all lines: docs/connectivity/native-protocol.rdx
+64Lines changed: 64 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -32,3 +32,67 @@ Both modes produce the same `PhysicalPlan` and execute identically.
32
32
./target/release/ndb
33
33
./target/release/ndb --host localhost --port 6433
34
34
```
35
+
36
+
## Handshake
37
+
38
+
Every native connection performs a versioned handshake before any opcode frame. SDKs do this automatically on first use; you only need this section if you're implementing a wire-level client.
| `limits` | `Limits` struct | Per-op caps the server enforces (see below) |
58
+
59
+
### `HelloErrorFrame`
60
+
61
+
Returned when no protocol version overlaps. Carries a typed `code` (`VersionMismatch`) and a UTF-8 reason. The connection is closed after the frame is sent.
62
+
63
+
### Server-enforced `Limits`
64
+
65
+
The `HelloAckFrame` carries the server's per-op caps. SDKs surface these via `client.limits()`. Sending a request that exceeds a cap returns a typed `LimitExceeded { limit_name, value, max }` error.
| `max_top_k` | `Option<u32>` | `top_k` for any retrieval op |
71
+
| `max_scan_limit` | `Option<u32>` | Result set size for scans |
72
+
| `max_batch_size` | `Option<u32>` | Rows per batch INSERT/UPSERT |
73
+
| `max_crdt_delta_bytes` | `Option<u32>` | Single CRDT delta payload |
74
+
| `max_query_text_bytes` | `Option<u32>` | SQL text length |
75
+
| `max_graph_depth` | `Option<u32>` | `MAX_DEPTH` for graph traversal |
76
+
77
+
`None` means uncapped. Defaults are uncapped — operators set caps via configuration.
78
+
79
+
## Capabilities
80
+
81
+
`Capabilities` is a typed wrapper around the `u64` bitmask returned in `HelloAckFrame`. SDK consumers query specific features via accessor methods rather than testing raw bits, so feature additions never break clients:
82
+
83
+
```rust
84
+
let caps = client.capabilities();
85
+
if caps.has_graphrag_fusion() { ... }
86
+
if caps.has_continuous_aggregates() { ... }
87
+
```
88
+
89
+
The `Capabilities::has(bit)` escape hatch is available for forward compatibility, but typed accessors are preferred.
90
+
91
+
## Server Identity
92
+
93
+
```rust
94
+
client.proto_version() // u16 — negotiated protocol version
95
+
client.server_version() // String — server build identifier
Copy file name to clipboardExpand all lines: docs/data-modeling/schemas-types.rdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ description: Data types, schema enforcement, typeguards, and schema evolution.
27
27
28
28
**Schemaless** — No schema required. Fields can vary between documents. Types are inferred on insert. This is the default when you `CREATE COLLECTION x`.
29
29
30
-
**Strict** — Schema is defined at creation time and enforced on every write. O(1) field extraction via binary tuple format. Created with `TYPE DOCUMENT STRICT (...)`.
30
+
**Strict** — Schema is defined at creation time and enforced on every write. O(1) field extraction via binary tuple format. Created with `(...) WITH (engine='document_strict')`.
31
31
32
32
## Typeguards (Schemaless Validation)
33
33
@@ -58,7 +58,7 @@ ALTER TYPEGUARD ON users DROP age;
0 commit comments