165068269b
DSL:
- add 1:n relationship [as <name>] from <P>.<col> to <C>.<col>
[on delete <action>] [on update <action>] [--create-fk]
- drop relationship <name> | from <P>.<col> to <C>.<col>
- show table <name> for re-displaying a structure on demand
Database (ADR-0013):
- Rebuild-table primitive following SQLite's
ALTER-via-rebuild recipe (foreign_keys=OFF outside tx,
copy-by-name, foreign_key_check before commit). Reusable for
B2 (column drops/renames/type changes).
- ReferentialAction enum (no action / restrict / set null /
cascade); SET DEFAULT awaits column DEFAULTs.
- __rdbms_playground_relationships metadata table -- names,
auto-generated as <Parent>_<pcol>_to_<Child>_<ccol>.
- Type::fk_target_type() validation at declaration; friendly
errors for type mismatch, non-PK target, missing column,
duplicate name.
- describe_table populates symmetric outbound + inbound
relationship lists. drop_table refuses while inbound
references exist; outbound metadata cleaned up alongside drop.
App / UI:
- In-line cursor editing in the input field: Left, Right,
Home, End, Delete, Backspace honoring UTF-8 boundaries.
- PageUp / PageDown scrolls the output buffer; viewport row
count fed back from the renderer via App::note_output_viewport
so scroll is capped against the actual visible area
(regression-tested) and snaps to the bottom on new output.
- Failure messages quote the command portion ("verb target"
failed: ...) for visual clarity; RelationshipSelector has a
proper Display impl so "no such relationship" reads cleanly.
- Structure rendering shows References / Referenced by sections.
Docs:
- ADR-0013 covers naming, metadata table, symmetric view, and
the rebuild-table strategy.
- requirements.md updates: C3 (FK done), B2 (primitive in),
T3 (compound-PK FK still pending). New entries: I1a (cursor
editing -- landed), I1b (Ctrl-A/E and readline shortcuts --
pending), V4 partial scroll, V5 (show family), C3a (modify
relationship -- deferred).
Tests: 154 passing (140 lib + 14 integration), 0 skipped.
Clippy clean with nursery enabled.
22 lines
1.3 KiB
Markdown
22 lines
1.3 KiB
Markdown
# Architecture Decision Records
|
|
|
|
This directory contains the project's ADRs, recorded per
|
|
[ADR-0000](0000-record-architecture-decisions.md).
|
|
|
|
## Index
|
|
|
|
- [ADR-0000 — Record architecture decisions](0000-record-architecture-decisions.md)
|
|
- [ADR-0001 — Language and TUI framework](0001-language-and-tui-framework.md)
|
|
- [ADR-0002 — Database engine](0002-database-engine.md)
|
|
- [ADR-0003 — Input modes and command dispatch](0003-input-modes-and-command-dispatch.md)
|
|
- [ADR-0004 — Project file format](0004-project-file-format.md)
|
|
- [ADR-0005 — Column type vocabulary](0005-column-type-vocabulary.md)
|
|
- [ADR-0006 — Undo snapshots and replay log](0006-undo-snapshots-and-replay-log.md)
|
|
- [ADR-0007 — Sharing and export](0007-sharing-and-export.md)
|
|
- [ADR-0008 — Testing approach](0008-testing-approach.md)
|
|
- [ADR-0009 — DSL command syntax conventions](0009-dsl-command-syntax-conventions.md)
|
|
- [ADR-0010 — Database access via a dedicated worker thread](0010-database-access-via-worker-thread.md)
|
|
- [ADR-0011 — Foreign-key column type compatibility](0011-fk-column-type-compatibility.md)
|
|
- [ADR-0012 — Internal metadata for user-facing column types](0012-internal-metadata-for-user-facing-types.md)
|
|
- [ADR-0013 — Relationships, naming, and the rebuild-table strategy](0013-relationships-and-rebuild-table.md)
|