@@ -4,7 +4,7 @@ An embedded database engine for agentic memory systems. Combines relational stor
44
55## Status
66
7- ** v0.1 — In-Memory Engine.** Fully functional with all query capabilities. No disk persistence yet (data lives in memory only) .
7+ ** v0.2 — Schema-Agnostic In-Memory Engine.** The database starts empty — define your schema with ` CREATE TABLE ` . Declarative constraints ( ` IMMUTABLE ` , ` STATE MACHINE ` ) enforce integrity per table. No disk persistence yet .
88
99## Features
1010
@@ -14,8 +14,8 @@ An embedded database engine for agentic memory systems. Combines relational stor
1414 - ` <=> ` operator for cosine similarity vector search
1515 - Standard SQL: SELECT, INSERT, UPDATE, DELETE, JOIN, WITH, ORDER BY, LIMIT
1616- ** MVCC snapshot isolation** — readers never block writers
17- - ** Schema enforcement ** — observation immutability, invalidation state machine, vector dimension validation
18- - ** CLI REPL** for interactive queries
17+ - ** Declarative table constraints ** — ` IMMUTABLE ` tables and ` STATE MACHINE ` column constraints via ` CREATE TABLE ` , plus vector dimension validation
18+ - ** CLI REPL** for interactive queries with both dot and psql-style commands ( ` .tables ` / ` \dt ` , ` .schema ` / ` \d ` , ` .help ` / ` \? ` , ` .quit ` / ` \q ` )
1919
2020## Quick Start
2121
@@ -25,8 +25,19 @@ cargo build --release
2525```
2626
2727``` sql
28- contextdb> INSERT INTO contexts (id, name, created_at)
29- VALUES (' 550e8400-e29b-41d4-a716-446655440000' , ' test' , 1709827200000 );
28+ contextdb> CREATE TABLE contexts (id UUID PRIMARY KEY , name TEXT );
29+ contextdb> CREATE TABLE observations (
30+ id UUID PRIMARY KEY ,
31+ data JSON,
32+ embedding VECTOR(384 )
33+ ) IMMUTABLE;
34+ contextdb> CREATE TABLE invalidations (
35+ id UUID PRIMARY KEY ,
36+ status TEXT
37+ ) STATE MACHINE (status: pending - > [acknowledged, dismissed], acknowledged - > [resolved, dismissed]);
38+
39+ contextdb> INSERT INTO contexts (id, name)
40+ VALUES (' 550e8400-e29b-41d4-a716-446655440000' , ' test' );
3041
3142contextdb> SELECT * FROM contexts;
3243
@@ -49,7 +60,7 @@ contextdb> SELECT id, data FROM observations
4960
5061| Crate | Purpose |
5162| -------| ---------|
52- | ` contextdb-core ` | Types, executor traits, error types, schema |
63+ | ` contextdb-core ` | Types, executor traits, error types, table metadata |
5364| ` contextdb-tx ` | Transaction manager with deferred-apply MVCC |
5465| ` contextdb-relational ` | Relational executor (scan, insert, upsert, delete) |
5566| ` contextdb-graph ` | Graph executor (bounded BFS, adjacency index) |
0 commit comments