Shared across implementations
Database design
These are the intended user-visible rules. Implementation details belong to each language version.
Databases and documents
KantanDB groups JSON documents into named databases. A document is always a JSON object. The server assigns its permanent ID and keeps a revision that changes after every update.
Clients can create, read, replace, patch, and delete documents. They can include the revision with a change so that an older copy cannot accidentally overwrite a newer one.
Indexes and queries
A database may define indexes over fields used often in queries. Queries can test scalar values for equality or compare numbers and strings by order.
JSONPath handles queries that do not fit a declared index. Query results contain document IDs and are split into pages. A cursor continues the same query from the previous page.
Persistence and limits
A successful write survives a restart. A document and its index entries change together, so a query does not see half of an update.
Requests and query work have fixed bounds. An expensive query stops instead of consuming unlimited time or memory.
Document encryption
Document bodies are encrypted before they reach storage. The server needs a secret key kept outside the data directory. Losing that key makes the documents unreadable.
Encryption does not hide everything. Database names, document IDs, index definitions, indexed values, and record sizes remain visible because the database needs them to find and order data.