Skip to content

Commit 92c1c74

Browse files
Update README for v0.2: schema-agnostic, declarative constraints
1 parent 005f30b commit 92c1c74

11 files changed

Lines changed: 35 additions & 24 deletions

File tree

Cargo.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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.2Schema-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

3142
contextdb> 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) |

crates/contextdb-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "contextdb-cli"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2024"
55

66
[dependencies]

crates/contextdb-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "contextdb-core"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2024"
55

66
[dependencies]

crates/contextdb-engine/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "contextdb-engine"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2024"
55

66
[dependencies]

crates/contextdb-graph/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "contextdb-graph"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2024"
55

66
[dependencies]

crates/contextdb-parser/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "contextdb-parser"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2024"
55

66
[dependencies]

crates/contextdb-planner/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "contextdb-planner"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2024"
55

66
[dependencies]

crates/contextdb-relational/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "contextdb-relational"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2024"
55

66
[dependencies]

crates/contextdb-tx/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "contextdb-tx"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2024"
55

66
[dependencies]

0 commit comments

Comments
 (0)