Skip to content

Update the docs for TuringDB 3.1 and add release notes - #23

Merged
rjb32 merged 2 commits into
mainfrom
docs-3.1
Nov 9, 2026
Merged

rjb32 merged 2 commits into
mainfrom
docs-3.1

Conversation

@rjb32

@rjb32 rjb32 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Updates the docs for TuringDB 3.1 and adds a Release Notes section with a 3.1 release page.

What changes

Protocol and clients

  • The server now speaks only the binary protocol over HTTP/1.1. The HTTP API section and every reference to the JSON API, USE_TURING_PROTO, TURINGDB_TYPE and type="json" are removed. commands.mdx gains a "Connecting clients" section.
  • TuringDB(host="http://localhost:6666") raises in 3.1, so every page now uses TuringDB(host="localhost", port=6666).
  • The Python SDK reference is rewritten for the two backends (native, embedded), the new connection errors, turingdb.Point, parameter types and the result types.
  • Troubleshooting is rewritten around the errors 3.1 actually raises: URL hosts, version mismatches, the 1 MiB limit, reconnecting after a protocol error, auth, and JavaScript fetch/CORS/Vite issues.

New JavaScript SDK section (jssdk/)

  • Get started: Node.js, TypeScript, and the browser through a same-origin proxy, with Vite and nginx setups.
  • Reference: options, Column, value and parameter types, versioning (LOAD COMMIT) and errors.

Query language

  • Parameters for values, map projection and m['key'], SET n = map / SET n += map, points and spatial functions, exists() over a pattern, allReduce, IS label tests, elementId, isEmpty, coll.indexOf, split on a list, datetime of a map, sum/avg of durations, /* */ comments, keywords as names.
  • UNION, NEXT and WHEN inside every subquery, and COLLECT of maps and paths.
  • Paths are now returned as flat ID lists, writes from map rows need no conversion, and the lookup-by-ID guidance covers literal lists and parameters.
  • A "Coming from 3.0" note lists the results that changed.

Release Notes

  • A new sidebar group with an "All Releases" overview and a TuringDB 3.1 page built around query parameters, the binary protocol over HTTP/1.1, the WebAssembly-based TypeScript client, allReduce, COLLECT and other subqueries, and points with haversine distance.
  • Six new pixel icons for the highlight cards, and a 3.1 banner on the home page.

How it was checked

  • Against the published packages: PyPI turingdb==3.1 and npm turingdb@3.1.0, both identical to the v3.1 tag.
  • Every documented Cypher example ran against a 3.1 server: 382, three of which need other data or an extension and fail as expected.
  • The 335 examples from before this PR give identical results on 3.0.2 and 3.1, apart from the new path format.
  • The Python and JavaScript snippets ran against fresh 3.1 servers, and the TypeScript blocks type-check.
  • The documented Vite dev, Vite build and nginx setups were run in headless Chromium, including nginx adding the auth token.
  • npm run build prerenders 47/47 pages, tsc --noEmit and the anchor test (293/293) pass, and there are no broken internal links or anchors.

Worth flagging

  • Engine bug. In UNWIND $rows AS r MATCH (n ...) SET n += r.props RETURN n.newProp, the RETURN reads null for a property that the SET creates. The stored value is correct, and a single SET n += $p reads back fine. The docs avoid this pattern.
  • Performance trap. With parameters, WHERE n = $id is a direct lookup, but id(n) = $id and n IN $ids scan every node. The docs point to the fast forms.
  • npm README. It says Vite needs no configuration, but vite dev fails to load the .wasm decoder without optimizeDeps: { exclude: ["turingdb"] }. The production build works as is.
  • Other repos. The turingdb-examples notebooks and the turingdb-skills skill still use host="http://localhost:6666", which raises on 3.1. The old public turingdb-typescript-sdk repo (HTTP/JSON, v0.1) predates the npm package.
  • Kept on purpose.
    • The benchmark report still says its numbers were measured with the earlier JSON client, now as a historical note.
    • The 3.1 release page lists the JSON API under "Removed".
    • Troubleshooting quotes the error that an old Python SDK prints against a 3.1 server.

rjb32 added 2 commits November 9, 2026 19:59
Brings the docs in line with turingdb 3.1 (PyPI 3.1, npm 3.1.0). Every
Cypher example in query/ (382 of them) was run against a 3.1 server, and
the Python and JavaScript snippets against fresh 3.1 servers.

Protocol and clients:
- the server speaks only the binary protocol over HTTP/1.1, so the HTTP
  API section, USE_TURING_PROTO, TURINGDB_TYPE and type="json" are gone;
  commands.mdx gains a "Connecting clients" section;
- TuringDB(host="localhost", port=6666) replaces the URL form, which 3.1
  rejects, on every page; the Python SDK reference covers the two
  backends, the new connection errors, turingdb.Point and parameter types;
- troubleshooting is rewritten around the errors 3.1 raises.

New JavaScript SDK pages (jssdk/): get started for Node.js, TypeScript and
the browser (same-origin proxy, Vite optimizeDeps.exclude, nginx), and a
reference for options, columns, value and parameter types, versioning and
errors.

Query language: parameters for values, map projection and m['key'],
SET n = map / SET n += map, points and spatial functions, exists() over a
pattern, allReduce, IS label tests, elementId, isEmpty, coll.indexOf,
split on a list, datetime of a map, sum/avg of durations, /* */
comments, keywords as names, UNION/NEXT/WHEN inside every subquery,
COLLECT of maps and paths, paths as flat ID lists, writes from map rows
without conversion, ID lookups with literal lists and parameters, and
the 3.0 -> 3.1 behaviour changes.

Release notes: a new "Release Notes" group with an overview of all
releases and a TuringDB 3.1 page built around query parameters, the
binary protocol over HTTP/1.1, the WebAssembly-based TypeScript client,
allReduce, COLLECT and other subqueries, and points with haversine
distance, plus six pixel icons for its highlight cards and a banner on
the home page.
Rewraps the code lines that made a block scroll sideways, on every page,
and makes the opening of the 3.1 release page gentler.

Code layout (128 overflowing blocks before, 6 after):
- Cypher breaks before relationships, after RETURN items, and around
  CASE, FOREACH, COLLECT bodies and point calls; VECTOR SEARCH and CALL
  put YIELD on its own line;
- Python splits long query strings by implicit concatenation and moves
  trailing comments above their line; JavaScript does the same with +;
- the six blocks left are JSONL records, a Jupyter log and CLI sessions,
  which must stay one line per record or command.

Checked against the previous text: Python ASTs and JavaScript token
streams are unchanged, and every changed Cypher query gives the same
result on a 3.1 server. The few intended changes were run too:
- the shortest-path recipe passes node IDs as a $ids parameter instead
  of an f-string (same stations);
- the vector CSV writer, the release and JS reference parameter examples,
  and the JS get-started loop use a named variable (same output);
- allReduce examples name the accumulator t, and query/functions names
  its columns under10 and under5 (same values);
- the cosine/euclidean pair in vector-search is two queries.

Release page: simpler intro paragraphs, and a first point in the parser
section on its speed (23 µs instead of 54 µs for a 12-line query).
@rjb32
rjb32 merged commit 787845a into main Nov 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant