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

Integration with knex.js bindings not working as expected #209

Closed
mandaputtra opened this issue Feb 19, 2025 · 2 comments · Fixed by #210
Closed

Integration with knex.js bindings not working as expected #209

mandaputtra opened this issue Feb 19, 2025 · 2 comments · Fixed by #210
Assignees
Labels
bug Something isn't working

Comments

@mandaputtra
Copy link

mandaputtra commented Feb 19, 2025

Current Behavior

When I use the query like this

await knex.raw("select * from users where email = '[email protected]'")

I get result as expected, but when I'm doing this I got no result at all

await knex.raw("select * from users where email = ?", ['[email protected]'])

// or

await knex('users').where('email', '[email protected]')

I'ts returned with undefined, or no result. The debug result seems fine. So I don't know what's going on internally. Here is the debug result:

{
  method: 'select',
  options: {},
  timeout: false,
  cancelOnTimeout: false,
  bindings: [ '[email protected]' ],
  __knexQueryUid: '9DzRy-hEBsxEfjGYmLt9p',
  sql: 'select * from `users` where `email` = ?'
}

Expected Behavior

Should result in finding the row

Steps to Reproduce the Problem

  1. Use example of integrations on Knex here
  2. Use bindings or anything else that requires bindings
  3. See no result

Environment

  • Version: "@sqlitecloud/drivers": "^1.0.406", "knex": "^3.1.0",
  • Platform: MacOS
  • Node.js Version: 20.x.x
@mandaputtra mandaputtra added the bug Something isn't working label Feb 19, 2025
@Gioee Gioee self-assigned this Feb 19, 2025
@Gioee Gioee linked a pull request Feb 19, 2025 that will close this issue
@Gioee Gioee closed this as completed in 076e1d9 Feb 20, 2025
@Gioee
Copy link
Member

Gioee commented Feb 21, 2025

Hi @mandaputtra
We've fixed this issue, we'll ship the new version with the fix in a few hours on npm.
Thank you for all the details that helped us find the problem.

@Gioee Gioee reopened this Feb 21, 2025
@Gioee Gioee closed this as completed in 7fa7da8 Feb 21, 2025
@Gioee
Copy link
Member

Gioee commented Feb 24, 2025

Hi @mandaputtra ,
This bug has been fixed in version 1.0.417

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants