Li-native Postgres-shaped database engine (library + embedded server). Part of the PH-DB program for registry v2 and the lean lidb + lis bundle.
./scripts/smoke.shRequires cmake and python3 only (native lidb_embed; sqlite3 removed PH-DB-3.1). Not production Postgres.
When BENCH_DB_*_RUN_HARNESS=1, benchmarks invokes scripts under scripts/bench/:
| Env | Script | Tier |
|---|---|---|
BENCH_DB_SECURITY_RUN_HARNESS=1 |
scripts/bench/security_harness.sh |
tier_db_security |
BENCH_DB_MEMORY_RUN_HARNESS=1 |
scripts/bench/memory_footprint.sh |
tier_db_memory |
BENCH_DB_PARALLEL_RUN_HARNESS=1 |
scripts/bench/parallel_load.sh |
tier_db_parallel |
Optional: BENCH_PROFILE=ci|nightly, LIDB_EMBED, LIDB_RLS_HARNESS=1 (RLS probes). JSON lines via harness_emit.py for benchmarks ingest.
| Path | Phase | Role |
|---|---|---|
migrations/ |
PH-DB-1 / PH-DB-5 | Registry schema + RLS (001_registry.sql, 002_rls_registry.sql) |
liq/ |
PH-DB-2 | Token-efficient query language — parser/compiler (Python stub) |
liorm/ |
PH-DB-2 | Secure ORM — catalog allowlist, execute, capabilities (Python stub) |
tests/ |
PH-DB-2 | pytest unit tests for liq/liorm |
tests/security/ |
PH-DB-2 / PH-DB-5 | CVE harness (liorm) + RLS stubs (engine) |
scripts/run_tests.sh |
PH-DB-2 | venv pytest + security run_all.sh |
docs/footprint.md |
PH-DB-1 | registry-min RAM/CPU targets |
docs/pg-subset-v1.md |
PH-DB-1 | Supported / excluded SQL surface |
docs/liq-spec.md |
PH-DB-2 | liq Lang→IR→SQL pipeline |
docs/auth-rls.md |
PH-DB-5 | JWT GUCs, tenant RLS policies, lis session setup |
src/ |
PH-DB-1+ | Engine (WAL, heap — in progress) |
- Footprint targets
- Postgres subset v1
- liorm API sketch
- liq AST examples
- liq specification
- Auth and RLS
- Security regression stubs
- lis (PH-DB-3): embeds lidb in-process; agents and CLI use
liq/liorminstead of ad-hoc SQL strings. - lic / registry: registry-min profile; see
profiles/registry-min.tomlin lis when available.
TBD — align with Li Langverse policy when publishing li-langverse/lidb.