Commit graph

3 commits

Author SHA1 Message Date
haozhe.yang
79ffb7b347 chore: fix lint issues across packages
- remove unused imports and variables
- add void to floating promises
- drop redundant return-await
- bind unbound method references
- replace == null with strict null/undefined checks
- add explicit sort comparators and Array.from helpers
- rename background_tasks capability to tasks
- migrate event sink to event bus in tests
2026-07-07 23:37:34 +08:00
haozhe.yang
37b2c46691 perf(minidb): add dt-ordered limit fast path for queries
- add SkipList.iterate and DtIndex.iterate: lazy range scans that let a
  caller stop early without materializing the whole range
- add IndexManager.hasEq for O(1) equality-index membership checks that
  avoid materializing the full posting list
- add MiniDb.tryDtOrderedLimit (with cheapEqChecks): for a query bounded
  by a single dt column whose result order is that column, walk the dt
  skiplist in order and stop at limit, pre-filtering cheap equality
  predicates before decode; wire it into query()
- fix text-index tokenization overflowing the call stack on large docs by
  loop-pushing instead of spreading the match array
- add bench/* benchmarks and tests for the fast path and skiplist iteration
2026-07-02 01:07:19 +08:00
haozhe.yang
ca5aea91b6 feat(minidb): add embedded key-value database package
- add @moonshot-ai/minidb: pure-Node.js embedded KV store mixing
  Redis-style in-memory access with WAL + snapshot persistence
- implement core engine: codec, store, wal, snapshot, recovery,
  compaction, lockfile, skiplist
- add indexing: dt-index, compound-index, text-index/postings,
  index-manager, query engine
- add server, value-reader, crc32 utilities
- include unit/e2e tests plus fuzz/crash-recovery/soak suites and
  session-store benchmarks
- register package in flake.nix and pnpm-lock.yaml
2026-06-28 16:30:10 +08:00