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

[Sqlite] Fix findFirst query for bun:sqlite #1885

Merged

Conversation

shaileshaanand
Copy link
Contributor

This PR fixes bug in bun:sqlite session implementation where findFirst query failed because of differences in return type of bun:sqlite's Statement.get() and Statement.values()

bun:sqlite's Statement.values() returns an array of arrays where as Statement.get() returns an object.

The custom mapRelationalRow function always expects an array of arrays for mapping.
Hence I have changed to the Statement.values() function for PreparedQuery.get() which fixes #1882

This commit fixes bug in bun:sqlite session implementation where findFirst query failed because of differences in return type of bun:sqlite's Statement.get() and Statement.values()
@iamvinny
Copy link

Is there any workaround before the fix gets merged?

@AndriiSherman AndriiSherman merged commit e14d6ca into drizzle-team:beta Mar 14, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Using Bun SQLite, findFirst query returns undefined values for a simple query.
3 participants