writeonce/docs/runtime/database
shoney.arickathil 5943bf6890 docs: iteration 9b spec + plan — @table, relations, query (employee)
- spec settles 9b's three forks: SQL/Cypher layer superseded as the
  program surface (design history + wo-db engine-semantics reference);
  comprehension syntax desugared at compile time (no function values);
  System.Linq = operator vocabulary + edge cases, PostgreSQL = execution
  + integrity vocabulary (both references surveyed 2026-08-15)
- aggregate semantics normative: count/sum total 0 on empty, avg/min/max
  are ?T with nil (empty is data, not a fault); nil skipped; sum wraps
  like language arithmetic; GroupBy lowers as group-and-reduce
  (AggregateBy shape), transition/finalize ABI from nodeAgg
- relations: ref = FK with direct-index-probe check (nil passes,
  unchanged-key skips), backlink = secondary-index scan, delete is
  restrict-only; nil never joins, nil is a legal group key
- lowering: the compiler is the planner — queries become bytecode loops
  over cursor/group builtins, longest-prefix index selection, no plan
  tree, no SQL text in the image (disassembly-provable)
- plan: 6 tasks gated by a new docs/examples/employee sample
  (Department/Employee, @unique, composite index, ref/backlink,
  GroupBy report mode) with its own acceptance script + crash step;
  blocked on iteration 9's engine plan
- story 09b + status board updated; 02-wo-language.md carries the
  supersession note

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-15 09:10:08 +02:00
..
01-evaluation.md Pivot to the .wo language runtime: design docs, phase plans 2026-04-21 02:48:45 +02:00
02-wo-language.md docs: iteration 9b spec + plan — @table, relations, query (employee) 2026-08-15 09:10:08 +02:00
03-inmemory-engine.md Pivot to the .wo language runtime: design docs, phase plans 2026-04-21 02:48:45 +02:00
04-client-api.md Pivot to the .wo language runtime: design docs, phase plans 2026-04-21 02:48:45 +02:00
05-go-sdk.md Pivot to the .wo language runtime: design docs, phase plans 2026-04-21 02:48:45 +02:00
06-lowcode-fullstack.md Pivot to the .wo language runtime: design docs, phase plans 2026-04-21 02:48:45 +02:00
07-wo-seg-migration.md docs: status board at docs/00-status.md; gap-closure spec applied; recover lost doc 2026-08-10 23:42:26 +02:00