10 Commits
Author SHA1 Message Date
LeoVasanko 94c5ddeaba Inject state dicts by name (prev/state), rename MigrationResult to MigrationReport.
State dict injection now works by parameter name (prev/state, annotation
not checked) with DictPrev/DictState tags taking precedence; DictPre/DictPost
remain as aliases. MigrationResult is renamed to MigrationReport with fields
original/version/applied; the old type alias and a deprecated .migrations
property remain. Old symbols stay covered by the original tests; new-style
tests import from the kanta root. Includes some unrelated ruff formatting.
2026-08-27 14:50:34 +00:00
LeoVasanko f489216c2a All remaining events through logformat, cleaner migration message, prettier demo. 2026-08-07 17:12:29 +00:00
LeoVasanko 08f3c44f1f Group all migration events into one row migrate:vN (if version changed) OR migrate:msgspec
- Log as a single event
- Logging config has debug parameter to lower level to DEBUG, showing migration diffs
2026-08-07 16:20:56 +00:00
LeoVasanko c101f187d8 Implement richer, fully customizable logging; customizable timestamps (#1)
- `@kanta.logemit` handler for completely customizable logging output, with `LogEvent` structure and `kanta.tty.Line` helper to create colorized text and fixed width fields
- `configure_logging(diff=False)` to disable diff display globally (supplementing per-transaction `logdiff=False`)
- `transaction(extra: Any = ...)` for passing extra strings or custom metadata to logs
- `@kanta.clock` to provide user controlled clock for deterministic database outputs
- Added a demo script that shows basic functions, migrations, logfmt etc.
2026-08-07 15:08:28 +00:00
LeoVasanko 4dc2f0648e Fix creation of new database, ensuring that a bootstrap record of the initial state is always written. 2026-06-15 00:27:49 +00:00
LeoVasanko c04a245366 Add read only mode that doesn't use locking. Useful for inspection while the database is in use or when no changes are intended (except in RAM). 2026-06-14 19:35:06 +00:00
LeoVasanko 7e553bd868 Improved log formatting support by @kanta.logfmt, which replaces old resolver and user_display arguments (breaking change). 2026-06-13 21:22:05 +00:00
LeoVasanko 4db046d627 Implement proper bootstrap and fatal error handling via decorators. Breaks compatibility. 2026-06-13 02:53:09 +00:00
LeoVasanko ebfed10f24 Proper ts/mtime setting and tracking. Added Kanta.mtime property for reading current change time. 2026-06-13 00:49:35 +00:00
LeoVasanko c254970ae5 Initial commit 2026-06-12 19:15:46 +00:00