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

Fix jsonb inserts in PG when postgres.js is used as driver #1641

Closed
wants to merge 2 commits into from

Conversation

Angelelz
Copy link
Collaborator

Closes #724. Closes #1511

  • Added an optional way to bypass the decoder when building the insert query. This is used only by the PgDialect when instantiated within the PostgresJsDatabase class.

This allows letting PostgresJs stringify the json object and write it properly to the database.

@AndriiSherman
Copy link
Member

Related to #1560

@Angelelz
Copy link
Collaborator Author

Angelelz commented Jan 10, 2024

I'm going to close this PR and open another one in which I will follow the same approach to bypassing the parsing made by postgres.js as the approach I used in #1659.
At the time I wrote this PR I didn't know how to bypass the parsing done by postgres.js. I believe that will be a lot simpler approach than what I did here, which was basically bypassing drizzle-orm's own parsing.

@Angelelz Angelelz closed this Jan 10, 2024
@Hebilicious
Copy link

Hebilicious commented Jan 14, 2024

For the subscribers : #1785

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants