Known limitations and what is open
What TypeDBLite does not do, or does differently from TypeDB, and what is still open. Each item says where it comes from. This page is a list of known gaps, not a roadmap with dates: nothing here is promised for a release.
- What it is, and is not
- The language
- Compatibility with TypeDB
- Performance and scale
- Replication and the hub
- Platforms and requirements
- What is open
What it is, and is not
Section titled “What it is, and is not”TypeDBLite is an embedded library: a TypeScript implementation of TypeDB’s data model and query language, over SQLite, that runs inside your process. It is not a server, and it is not TypeDB. It is an independent project, not affiliated with or endorsed by TypeDB Ltd. It speaks TypeQLite, a dialect of TypeQL 3.x, and the language guide says what that dialect covers.
The language
Section titled “The language”A construct TypeQLite does not support is refused by name (typedblite.not-implemented, or a parse error).
It is never silently skipped. From the language guide:
- A function that returns things. A function can return values and attributes, but not entities, relations or types.
- Writing list values.
owns tag[]can be declared, buthas tag[] [ … ]cannot be written. - Value-type conversion functions, such as
double($a). let … inover anything but a function call.return check, and areduceafter a write stage.- Several reads in one
query()call. Run each separately. - Rules and inference. TypeDB 3 removed them in favor of functions, and TypeDBLite follows.
Annotations
Section titled “Annotations”Some annotations are accepted and not enforced on writes. An unenforced one never fails silently:
define may report it with a typedblite.annotation-not-enforced fact.
| Annotation | In TypeDBLite |
|---|---|
@key, @unique, @abstract, @regex |
Enforced |
@independent |
Honored |
@doc |
Retained |
@card(min..max) |
Partly. It decides whether fetch returns a value or a list, and whether update may replace one. Bounds other than a key’s are not enforced on writes |
@range, @values |
Arguments checked against the value type at define. Not enforced on writes |
@distinct, @cascade, @meta |
Parsed and accepted. Not enforced |
Compatibility with TypeDB
Section titled “Compatibility with TypeDB”Measured against TypeDB’s own behavior specification (cited run: 2026-11-12, spec pin
typedb/typedb-behaviour@7d35851, surveyed against TypeDB 3.10.4):
- 1,742 of 1,756 scenarios pass (99.2%). 12 are deviations, scenarios that TypeDB 3.10.4 fails too, each owned by ADR-007. 1 fails, and 1 is not applicable.
- The one failure is
updateL959. TypeDB treats anownswith no@cardas@card(0..1)and enforces it at commit. TypeDBLite does not enforce that default, so a thing can hold several values where TypeDB would refuse the commit. This is a product decision that is still open: a consumer’s stores rely on the current behavior, and enforcing the default would refuse writes to things that already hold several values. See CONFORMANCE.md for the two ways forward. - The spec covers queries and schema (
query/language). The numbers say how closely TypeDBLite matches TypeDB on that. They say nothing about parts of TypeDB the spec does not cover, such as TypeDB’s server and its drivers.
The full list, with the reason for each non-passing scenario, is in CONFORMANCE.md.
Performance and scale
Section titled “Performance and scale”From the load test, run on generated data of up to 100,000 entities and 21,000 tasks:
- One writer at a time. SQLite allows one writer, so write throughput does not grow with more processes.
With four writers the 99th-percentile wait for the lock was 0.9 to 1.4 s, and up to 2.5 s with four readers
alongside, under the 5 s
busy_timeoutbut not far under it. - The planner has no cost model. Thing variables are enumerated in the order they are written, and a variable no relation or literal reaches is enumerated whole.
- Read paths run one SQL statement per row per binding. A statement is cheap, but the count adds up.
- The empty-answer count visits the whole type, so it is linear in the type’s size.
- No change-log retention policy. A consumer that rewrites large values grows the log without bound
unless it calls
changeLog.compact()andvacuum(). In one real store that took 967 MB down to 81 MB.
Replication and the hub
Section titled “Replication and the hub”- The hub trusts everything that can reach it. The change-stream handler has no authentication and no
encryption, so you mount it behind your own. It checks that a pushed revision is derived from its content, so a
revision names one content everywhere, but a peer that may write can still make its write win: only
authentication decides who may write. It refuses non-JSON bodies, bodies
over
maxBodyBytes, and streams overmaxStreams, applies a batch all or none, and does not echo internal errors. The replication guide’s Security section lists each case as verified and shows an authenticated mount.serveChangeStreambinds127.0.0.1only. - Conflicts are kept, not resolved. Different edits to the same thing are all kept, with a deterministic winner. Which losing revision matters is your application’s decision.
- Offline-first apps must treat a failed sync as offline. A sync that did not happen fails; it never reports success.
Platforms and requirements
Section titled “Platforms and requirements”- Node.js 22.16 or later. Node 22.12 has no
node:sqlite, and 22.13 to 22.15 ship it without full-text search (FTS5), which the engine requires. node:sqliteis still marked experimental by Node. It prints anExperimentalWarningthe first time it is used.- In a browser, TypeDBLite runs on a synchronous WASM SQLite inside a Web Worker
(ADR-009). It is slower than
node:sqlite. - Linux, macOS and Windows. The test gate has passed on all three. GitHub Actions is currently off, so
nothing re-checks that on every change; run
npm run gateyourself. - The VS Code extension is built from source and is not yet on a marketplace. In a remote window (WSL, SSH, a container), coloring Markdown previews in your theme needs the optional TypeQLite Theme Bridge, installed in your local VS Code.
What is open
Section titled “What is open”These are open in the repository’s own records, in no order of priority:
- Whether to enforce TypeDB’s default
@card(0..1)(the one failing scenario above). - Enforcing
@cardbounds,@range,@values,@distinctand@cascadeon writes. - A cost model for the query planner, and fewer SQL round trips per row.
- A change-log retention policy.
- The unsupported constructs listed under The language.
A good first issue is a good way in. The 14 non-passing conformance scenarios, and small constructs with a
real caller, are the natural source. See CONTRIBUTING.
TypeDBLite is an independent open-source project, built on TypeDB with thanks. It is not affiliated with, sponsored by, or endorsed by TypeDB Ltd. Released under the MPL-2.0 license.