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

Update for latest Postgres.js #2

Open
dizlexik opened this issue Dec 6, 2022 · 0 comments
Open

Update for latest Postgres.js #2

dizlexik opened this issue Dec 6, 2022 · 0 comments

Comments

@dizlexik
Copy link

dizlexik commented Dec 6, 2022

Hey @Minigugus, is there a possibility that you might update this to work properly with the latest version of Postgres.js (currently v3.3.2 as I write this)?

Here are a couple of the problems I ran into, which I've solved myself temporarily by manually altering /dist/index.js, but I'd rather my project depend on a properly updated version of this npm package instead of my patch branch:

  1. createTableIfMissing throws an UNSAFE_TRANSACTION error since sql.begin is now required for transactions. I worked around this by manually creating the table myself.
  2. I resolved a couple of instances of the following error by updating Date instances to strings with .toISOString():

    The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received an instance of Date

I'm not sure if there are any other issues but it appears to be working well for me now with the above workarounds. Let me know if you have any plans of officially updating this to work with v3. Thanks!

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

No branches or pull requests

1 participant