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

drizzle query (https://orm.drizzle.team/docs/rqb) does not work with bun:sqlite? #8942

Closed
huseeiin opened this issue Feb 16, 2024 · 2 comments
Labels
bug Something isn't working needs investigate Needs to be investigated to find the root cause

Comments

@huseeiin
Copy link
Contributor

What version of Bun is running?

1.0.26+c75e768a6

What platform is your computer?

Linux 6.1.66-1-lts x86_64 unknown

What steps can reproduce the bug?

https://github.com/huseeiin/bun-drizzle-bug-reprod

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

@huseeiin huseeiin added the bug Something isn't working label Feb 16, 2024
@huseeiin huseeiin changed the title drizzle query (https://orm.drizzle.team/docs/rqb#modes) does not work with bun:sqlite? drizzle query (https://orm.drizzle.team/docs/rqb) does not work with bun:sqlite? Feb 16, 2024
@Electroid Electroid added the needs investigate Needs to be investigated to find the root cause label Feb 16, 2024
@redraskal
Copy link
Contributor

Likely related to drizzle-team/drizzle-orm#1885 & drizzle-team/drizzle-orm#1276, not yet merged

@AndriiSherman
Copy link

I'm going to fix it with one of the PRs, so it won't be a blocker for anyone, but I believe bun:sqlite should have the possibility to run .raw() with .get(), enabling it to return an array of 1 array instead of 1 object already mapped. All other SQLite drivers have this capability, so I think bun:sqlite should have it too. So we don't need to use values and then get the first element; we can just have one raw response for performance purposes

stmt.raw().get(...params)

cc @Jarred-Sumner

@huseeiin huseeiin closed this as completed Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs investigate Needs to be investigated to find the root cause
Projects
None yet
Development

No branches or pull requests

4 participants