Coder Social home page Coder Social logo

Support pg.js about node-connect-pg-simple HOT 3 CLOSED

voxpelli avatar voxpelli commented on May 29, 2024
Support pg.js

from node-connect-pg-simple.

Comments (3)

voxpelli avatar voxpelli commented on May 29, 2024

Hadn't seen the "pg.js" variant actually – great that you point it out!

It has always been possible to supply a driver of ones own and it is recommended that one do as that enables all parts of the program to share the same connection pool etc. The included pg library is just a fallback for the cases where postgres isn't used for anything but the sessions.

I would propose just changing the fallback library from "pg" to "pg.js" entirely and let anyone who want a the more performant compiled library to supply it themselves (as they are hopefully already doing if they have an app that needs the performance).

Does that sound like a good solution?

from node-connect-pg-simple.

rauno56 avatar rauno56 commented on May 29, 2024

I actually think it's a great compromise to be made here. I approve.
But IF we are going to break the backwards compatibility with #6 anyways I would also throw out the dependency(change it to devdep).

from node-connect-pg-simple.

voxpelli avatar voxpelli commented on May 29, 2024

I think the benefit of being able to include the session module with as little configuration as possible outweighs the benefit of having one extra dependency, especially now when that dependency doesn't have to be compiled.

A minor bonus is that the dependency also documents what API of the pg/pg.js modules it is that the module support.

Apart from just switching from "pg" to "pg.js" I also flagged the 3.x versions of the modules as being compatible as none of the breaking changes in the major version there broke anything for this module.

from node-connect-pg-simple.

Related Issues (20)

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.