Skip to content

feat: implement prepared statements - #294

Open
chrispader wants to merge 2 commits into
mainfrom
codex/prepared-statements-pr
Open

chrispader wants to merge 2 commits into
mainfrom
codex/prepared-statements-pr

Conversation

@chrispader

@chrispader chrispader commented Jul 23, 2026

Copy link
Copy Markdown
Member

Executing the same SQL repeatedly with different parameters currently prepares it on every call. This PR adds db.prepare(query) with synchronous and asynchronous execution so callers can reuse one native statement. Statements clear their bindings between executions and expose finalize() and isFinalized; callers should finalize them before closing the database. Prepared operations also use the connection's existing queue and lock, with tests covering reuse, errors, and finalization.

@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
react-native-nitro-sqlite Ready Ready Preview Sep 18, 2026 1:15pm UTC

Request Review

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