8000 feat: BrowserDb query cursor and v3 core (v3) by adityamukho · Pull Request #4 · project-minigraf/minigraf-wasm · GitHub
[go: up one dir, main page]

Skip to content

feat: BrowserDb query cursor and v3 core (v3) - #4

Merged
adityamukho merged 1 commit into
v3from
feat/etl-surface
Oct 7, 2026
Merged

adityamukho merged 1 commit into
v3from
feat/etl-surface

Conversation

@adityamukho
Copy link
Copy Markdown
Contributor

The browser part of project-minigraf/minigraf#462, #465 and #467, following minigraf's docs/superpowers/specs/2026-10-07-binding-etl-surface-design.md (minigraf PR #468).

What's new

  • minigraf is a git dependency on the core v3 commit from PR #468. That commit adds BrowserDb.query(datalog) → BrowserCursor (vars(), nextBatch(n) with JSON rows or undefined, close(); non-queries throw API-012). This repo re-exports core, so wasm-pack build picks it up. Checked in the generated minigraf_wasm.d.ts.
  • README: documents the cursor. It also explains why read_only and the other file-backed options (#465) and LogWriter (#467, not built for wasm32) don't apply to the IndexedDB-backed BrowserDb, and that the fact log is not exposed in the browser.
  • README fix: the quick start used MiniGrafDb.inMemory() with a synchronous execute(). The package exports BrowserDb (await BrowserDb.open(name) / openInMemory()), and its execute() is async.
  • CI runs on PRs to v3, and on this branch the WASI binary job builds from core's v3. The WASI package ships the REPL binary, so nothing new is exposed there.

Testing

  • wasm-pack build --target web --features browser succeeds, and the .d.ts has BrowserCursor.
  • The cursor's behavior is covered by core's wasm-bindgen-test browser tests in PR #468 (headless Firefox, 12 passed).

🤖 Generated with Claude Code

https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn

Builds against the unreleased v3 core by git revision (switches to
=3.0.0 at the release), which adds BrowserDb.query() returning a
BrowserCursor (vars, nextBatch with JSON rows, close)
(project-minigraf/minigraf#462).

The README documents the cursor and why the file-backed parts of
project-minigraf/minigraf#465 (read_only and the other file options)
and #467 (LogWriter, not built on wasm32) do not apply in the browser.
It also fixes the quick start, which used MiniGrafDb.inMemory() and a
synchronous execute(); the package exports BrowserDb, whose execute()
is async.

CI runs on PRs to v3, and on this branch the WASI binary is built from
core's v3 branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn
@adityamukho
adityamukho merged commit 0589262 into v3 Oct 7, 2026
2 checks passed
@adityamukho
adityamukho deleted the feat/etl-surface branch October 7, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0