Code Monkey home page Code Monkey logo

connect-postgres-simple's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

dizlexik

connect-postgres-simple's Issues

`createTableIfMissing` option not working

Hey there,

just got around to trying this out, took a bit longer than anticipated ^^

Anyway, I struggled quite a bit at first because I trusted in the createTableIfMissing option to create the table, but it never did that.
This resulted in errors, which weren't really shown (probably because express-session only shows them in debug mode, which is odd). I had to manually add debug logging to access the error.

Maybe you could add some warnings if the table doesn't exists, etc.? (And fix the option, naturally ๐Ÿ˜‰)

Update for latest Postgres.js

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.