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

SQL: support "simple", multi-statement queries. #17029

Open
nicksrandall opened this issue Feb 3, 2025 · 0 comments
Open

SQL: support "simple", multi-statement queries. #17029

nicksrandall opened this issue Feb 3, 2025 · 0 comments
Assignees
Labels
bug Something isn't working bun.js Something to do with a Bun-specific API sql Something to do with `sql` in the "bun" module

Comments

@nicksrandall
Copy link

What version of Bun is running?

1.2.2

What platform is your computer?

Darwin 24.3.0 arm64 arm

What steps can reproduce the bug?

Bun's SQL implementation should only convert a query to a prepared statement if it has at least one variable (parameter). This is the only situation in where a prepared statement is needed. Otherwise, the client should just use a "simple" query which has the advantage of allowing multiple statements.

What is the expected behavior?

I would expect to be able to support multiple statements in a single query (very common for migration scripts).

What do you see instead?

I get the following error: cannot insert multiple commands into a prepared statement

Additional information

IMO, this is an essential feature for a SQL client. It's very cumbersome to do db migrations without this.

@nicksrandall nicksrandall added bug Something isn't working needs triage labels Feb 3, 2025
@RiskyMH RiskyMH added sql Something to do with `sql` in the "bun" module and removed needs triage labels Feb 3, 2025
@cirospaciari cirospaciari self-assigned this Feb 4, 2025
@RiskyMH RiskyMH added the bun.js Something to do with a Bun-specific API label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bun.js Something to do with a Bun-specific API sql Something to do with `sql` in the "bun" module
Projects
None yet
Development

No branches or pull requests

3 participants