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

Passing undefined values to InsertQueryBuilder.values doesn't fallback to defaults. #398

Closed
mehulmpt opened this issue Mar 29, 2023 · 2 comments · Fixed by #399
Closed
Assignees
Labels
bug Something isn't working mysql Related to MySQL postgres Related to PostgreSQL sqlite Related to sqlite

Comments

@mehulmpt
Copy link
Contributor

mehulmpt commented Mar 29, 2023

First of all, thank you for writing this lightweight TS safe library. We're migrating our website from MongoDB to PostgreSQL. We tried Prisma and it was a hot pile of disaster in terms on performance.

However, while setting up a few scripts, we found a bug inside this library. Our hands are currently full otherwise would have loved to jump into source and send a PR fix too. Here's how you can reproduce the bug:

  1. Go to https://codedamn.com/playground/4rv-jRRmU-BdpcEtjKm-0
  2. Click on "Run code" button on top right
  3. Go through the comments in the codebase
@igalklebanov igalklebanov added bug Something isn't working sqlite Related to sqlite built-in dialect Related to a built-in dialect labels Mar 29, 2023
@igalklebanov igalklebanov changed the title SQL parser bug Passing undefined values to InsertQueryBuilder.values doesn't default to null when using sqlite dialect. Mar 29, 2023
@igalklebanov
Copy link
Member

Hey 👋

Thank you for the reproduction code!

@igalklebanov igalklebanov self-assigned this Mar 29, 2023
@mehulmpt
Copy link
Contributor Author

Thanks for quick feedback. Note that this bug also exists on postgres dialect (saw that you labeled it as sqlite).

@igalklebanov igalklebanov added the postgres Related to PostgreSQL label Mar 29, 2023
@igalklebanov igalklebanov changed the title Passing undefined values to InsertQueryBuilder.values doesn't default to null when using sqlite dialect. Passing undefined values to InsertQueryBuilder.values doesn't fallback to defaults. Mar 29, 2023
@igalklebanov igalklebanov added the mysql Related to MySQL label Mar 29, 2023
@igalklebanov igalklebanov removed the built-in dialect Related to a built-in dialect label Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mysql Related to MySQL postgres Related to PostgreSQL sqlite Related to sqlite
Projects
None yet
2 participants