Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Statement.run() for SELECT statements #124

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Fix Statement.run() for SELECT statements #124

merged 2 commits into from
Jun 27, 2024

Conversation

penberg
Copy link
Contributor

@penberg penberg commented Jun 27, 2024

The better-sqlite3 API allows run() on all types of statements. However, we currently use libsql crate's Statement::execute(), which returns an error if a statement results in rows. Fix the compatibility issue by switching to the new Statement::run() method in libsql.

@penberg
Copy link
Contributor Author

penberg commented Jun 27, 2024

Needed for Statement::run() and Connection::total_changes()
The `better-sqlite3` API allows `run()` on all types of statements.
However, we currently use `libsql` crate's `Statement::execute()`, which
returns an error if a statement results in rows. Fix the compatibility
issue by switching to the new `Statement::run()` method in `libsql`.
@penberg penberg marked this pull request as ready for review June 27, 2024 10:28
@penberg penberg merged commit 2ac5142 into main Jun 27, 2024
9 checks passed
@penberg penberg deleted the fix-statement-run branch June 27, 2024 10:32
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