Data
Compository
AsanagiDB's document store, built directly into the graph engine. Store rich nested documents โ objects, arrays, primitives โ as first-class graph vertices. The Compository reconstructs them on read via recursive edge traversal, so you get back exactly what you stored.
Document model
Nested Objects
Property values prefixed object: are stored as linked child vertices. Deep or shallow reads โ your choice.
Ordered Arrays
Arrays are stored as array: edges with seq properties. Reconstruction sorts by seq, preserving insertion order.
Shallow / Deep
ls returns shallow stubs (_id, _class, key). retrieve returns the fully reconstructed document including all nested objects and arrays.
Wire Protocol
The Compository speaks newline-delimited JSON over a plain TCP
connection (default 127.0.0.1:8080). Requests are a JSON object on one line; responses are {"status":"ok","message":...}. See client libraries for ready-made SDKs.
// store (omit "_id" โ the server assigns one and returns it)
โ {"op":"store","label":"Article","entity":{"slug":"hello-world","title":"Hello World"}}
โ {"status":"ok","message":1}
// retrieve by id
โ {"op":"retrieve","id":1}
โ {"status":"ok","message":{"_id":1,"_class":"Article","slug":"hello-world","title":"Hello World"}}
// retrieve by key (when a key field is registered)
โ {"op":"retrieve","key":"slug","value":"hello-world"}
โ {"status":"ok","message":{"_id":1,"_class":"Article","slug":"hello-world","title":"Hello World"}}
// list (shallow)
โ {"op":"ls"}
โ {"status":"ok","message":[{"_id":1,"_class":"Article"},...]}
// delete
โ {"op":"delete","id":1}
โ {"status":"ok","message":"Vertex deleted"} Internal Fields
_id Integer vertex ID. Always assigned by the server on store and returned in the response, even if omitted from the request. _class Vertex label / document type (e.g. Article, Person). Set automatically from the store label. _key Name of the user-defined key field, if registered.