PostgreSQL client for node.js.

Overview

node-postgres

Build Status NPM version NPM downloads

Non-blocking PostgreSQL client for Node.js. Pure JavaScript and optional native libpq bindings.

Monorepo

This repo is a monorepo which contains the core pg module as well as a handful of related modules.

Documentation

Each package in this repo should have its own readme more focused on how to develop/contribute. For overall documentation on the project and the related modules managed by this repo please see:

Documentation

The source repo for the documentation is https://github.com/brianc/node-postgres-docs.

Features

  • Pure JavaScript client and native libpq bindings share the same API
  • Connection pooling
  • Extensible JS PostgreSQL data-type coercion
  • Supported PostgreSQL features
    • Parameterized queries
    • Named statements with query plan caching
    • Async notifications with LISTEN/NOTIFY
    • Bulk import & export with COPY TO/COPY FROM

Extras

node-postgres is by design pretty light on abstractions. These are some handy modules we've been using over the years to complete the picture. The entire list can be found on our wiki.

Support

node-postgres is free software. If you encounter a bug with the library please open an issue on the GitHub repo. If you have questions unanswered by the documentation please open an issue pointing out how the documentation was unclear & I will do my best to make it better!

When you open an issue please provide:

  • version of Node
  • version of Postgres
  • smallest possible snippet of code to reproduce the problem

You can also follow me @briancarlson if that's your thing. I try to always announce noteworthy changes & developments with node-postgres on Twitter.

Sponsorship 💕

node-postgres's continued development has been made possible in part by generous finanical support from the community and these featured sponsors:

If you or your company are benefiting from node-postgres and would like to help keep the project financially sustainable please consider supporting its development.

Contributing

❤️ contributions!

I will happily accept your pull request if it:

  • has tests
  • looks reasonable
  • does not break backwards compatibility

If your change involves breaking backwards compatibility please please point that out in the pull request & we can discuss & plan when and how to release it and what type of documentation or communication it will require.

Setting up for local development

  1. Clone the repo
  2. From your workspace root run yarn and then yarn lerna bootstrap
  3. Ensure you have a PostgreSQL instance running with SSL enabled and an empty database for tests
  4. Ensure you have the proper environment variables configured for connecting to the instance
  5. Run yarn test to run all the tests

Troubleshooting and FAQ

The causes and solutions to common errors can be found among the Frequently Asked Questions (FAQ)

License

Copyright (c) 2010-2020 Brian Carlson ([email protected])

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • self signed certificate error

    self signed certificate error

    Hi. Sorry ahead of time, I don't have a lot of detail here. We updated our packages today and afterwards started seeing a connection error from Sequelize ORM: "self signed certificate". We do in fact use a self signed certificate but this has never been a problem for us in the past. We downgraded from [email protected] to [email protected] and then we were able to connect again.

    opened by eric-elsholz 74
  • TypeError: Cannot read property 'name' of null

    TypeError: Cannot read property 'name' of null

    First off, thanks for the library! Overall it's been incredibly performant and straightforward to use. I am running into one issue which may be an issue with the library, though it's a bit hard to follow the protocol for me so my usage may be off as well.

    I'm running into an uncaught error during the parseComplete handler in client.js (https://github.com/brianc/node-postgres/blob/v6.0.1/lib/client.js#L131).

    I am doing a direct connect against the pool and then utilizing pg-query-stream

    pool.connect().then(function(client){
      stream = client.query(new QueryStream(query, null));
    
      stream.on('error', function(streamError){
        stream.close(function(closeError){ 
          // What to do with a close error? At this point stream is already hosed :shrug:
          client.release(streamError);
        }
      });
    
      stream.on('close', function(){
        client.release();
      }); 
    });
    

    At some point during my app's life cycle, I get an uncaught error

    TypeError: Cannot read property 'name' of null
        at null.<anonymous> (/var/app/current/node_modules/pg/lib/client.js:139:26)
        at emit (events.js:107:17)
        at Socket.<anonymous> (/var/app/current/node_modules/pg/lib/connection.js:121:12)
        at Socket.emit (events.js:107:17)
        at readableAddChunk (_stream_readable.js:163:16)
        at Socket.Readable.push (_stream_readable.js:126:10)
        at TCP.onread (net.js:540:20)
    

    So obviously activeQuery is becoming null, and I am trying to narrow down why I would receive a parseComplete event when the active query is null.

    According to my logs, the stream is not emitting an error, and seems to be closing normally. Therefore it seems like the connection client is getting a readyForQuery or end event, and then right after that getting the parseComplete event. Any idea why this would be happening, or see any issues with my usage? Thanks for any help you can give! I'll keep looking into it as well.

    opened by greghart 65
  • Wrong timestamp!

    Wrong timestamp!

    var pg = require('pg'); var conString = "..."; var client = new pg.Client(conString); client.connect(function(err) { if(err) { return console.error('could not connect to postgres', err); } var sql = "SELECT NOW() as now1, timezone('UTC'::text, now()) as now2"; client.query(sql, function(err, result) { if(err) { return console.error('error running query', err); } console.log(result.rows); client.end(); }); });

    Result is: [ { now1: Thu Aug 29 2013 11:37:14 GMT+0300 (FLE Summer Time), now2: Thu Aug 29 2013 08:37:14 GMT+0300 (FLE Summer Time) } ] And must be: [ { now1: Thu Aug 29 2013 11:37:14 GMT+0300 (FLE Summer Time), now2: Thu Aug 29 2013 08:37:14 GMT+0000 (UTC) } ] or equal dates This is tested with latest version node-postgres.

    opened by CnApTaK 52
  • ECONNRESET with unpooled connection / close

    ECONNRESET with unpooled connection / close

    We're in the process of bringing up our (normally AWS-based) stack on azure with a hosted PG instance. Azure apparently requires SSL (which may or may not be important, but it's in the stack trace, so..)

    We're running into issues with unpooled connections (used to verify DB availability) in our periodic DB status tests. node version is 6.9.0; node-postgres version is 6.4. Code looks like this (w/o longjohn):

    require('longjohn');
    const pg = require('pg');
    
    const DSN = 'postgres://uid:pwd@azure_db:5432/imp?ssl=true';
    
    function status(cb) {
        var start = Date.now();
        var client = new pg.Client(DSN);
        client.connect(function(err) {
            if (err) {
                return cb(err);
            }
    
            client.query("select 1 as pong", function(err, results) {
                client.end();
    
                if (err) {
                    return cb(err);
                }
    
                if (!results.rows || results.rows.length !== 1 || results.rows[0].pong !== 1) {
                    return cb(new Error("expected pong of 1"));
                }
    
                return cb(null, Date.now() - start);
            });
        });
    }
    
    setInterval(function() {
        console.log(new Date().toISOString());
        status(function(err, latency) {
            if (err) {
                console.error(err);
            }
        })
    }, 5000);
    

    .. errors (after 5s) with this:

    Error: read ECONNRESET
        at exports._errnoException (util.js:1022:11)
        at TLSWrap.onread (net.js:569:26)
    ---------------------------------------------
        at Client.connect (/home/andrew/tmp/node_modules/pg/lib/client.js:184:7)
        at status (/home/andrew/tmp/test-unpooled-pg.js:9:12)
        at Timeout.<anonymous> (/home/andrew/tmp/test-unpooled-pg.js:32:5)
        at ontimeout (timers.js:365:14)
        at tryOnTimeout (timers.js:237:5)
        at Timer.listOnTimeout (timers.js:207:5)
    

    .. seems like it may be related to https://github.com/brianc/node-postgres/issues/314 but unclear.

    bug 
    opened by aahoughton 39
  • Unhandled 'error' event thrown when the connection password doesn't match

    Unhandled 'error' event thrown when the connection password doesn't match

    When I connect to an existing database with the connect username but the wrong password, I got an unhandled exception using the following code. The parameter err is set, but the exception is still thrown.

    pg.connect(dbURL, function(err, client, done) {
      if(err) {
        return console.error('error fetching client from pool', err);
      }
      client.query('SELECT $1::int AS number', ['1'], function(err, result) {
        //call `done()` to release the client back to the pool
        done();
    
        if(err) {
          return console.error('error running query', err);
        }
        console.log(result.rows[0].number);
        //output: 1
        client.end();
      });
    });
    
    opened by david-rouchet 38
  • Pool query never returns

    Pool query never returns

    When I do Pool.query (Pool is instance of pg.Pool and successfully connected to DB), it never returns. I tried both promise syntax (async/await and then/catch) and callback syntax, none of them worked. The script just never ends.

    Using connection with the same details with psql works.

    Node v12.14.0 npm 6.13.4 pg 7.17.1 PostgreSQL 12.1

    EDIT: forgot to specify this happens when there's no row returned. EDIT2: Select DATE() works while from table doesn't

    waiting for more info 
    opened by danbulant 37
  • The connection pool sucks

    The connection pool sucks

    Hello -

    I think the client object interface is pretty good. What is not a good interface is the current incarnation of the pool. Namely pg.connect. Here are some reasons why:

    First of all, as a quick aside. The pooling was added to the module before the there was a lot of wisdom around "tiny modules that just do one thing." Sooo really it would be better to have the pool in a completely separate module. I would like, probably, to start developing the pool off in it's own module and maybe eventually rip the built in stuff out...but I don't like breaking APIs. Anyways....

    I think a good API makes the right thing easy and the wrong thing hard. Currently the pool is just about opposite of that.

    Here are some examples of the pool sucking:

    dead clients

    Because the pool waits for a client's query queue to drain, and once the client query queue is drained the client is automatically returned, if you never send a query to the client, the client is never returned. Eventually your pool is all checked out and idle and your app hangs. Here is an example of this total bullshit.

    app.get('/', function(req, res, next) {
      pg.connect(app.constring, function(err, client) {
        if(!req.session) {
          return next();
          //way to go partner. you just leaked a connection
        }
        client.query('SELECT * FROM customers WHERE id = $1', [req.session.id], function(err, result) {
          var html = app.render('home', {user: JSON.stringify(result.rows[0])});
          res.send(html);
        })
      });
    });
    

    transactions

    On the flip side of dead connections, greedy pool release mechanics of 'the first drain event' cause the client to get pushed back into the pool of available clients way too early.

    pg.connect(/*constring*/, function(err, con) {
      con.query('begin', function(err) { //start our transaction
        con.query('update bla', function(err) {
          setTimeout(function() {
            //way to go partner, you returned this connection to the pool with an open transaction
            //better hope no one else wants to run a query for 2 seconds or some weird stuff is gonna happen
            con.query('commit');
          }, 2000);
        });
      });
    });
    

    That right there is an example of the 'auto release' being too greedy and not greedy enough.

    I am going to fix this

    I'd like to open up discussion around a different API for the pool. After 24/48 hours I'll get started on a new implementation. So here's what I'm thinking....this would be backwards compatible by adding a 3rd parameter to the pg.connect function. A callback you call when you want to release the client back to the pool. The callback itself will take a single error argument in the style of node. If the argument is non-null, the client will be closed and removed from the pool instead of returned to the pool. This is how it would look:

    pg.connect(/*constring*/, function(err, client, done) {
       //hmmm....turns out I actually don't need this client
      done();
    });
    

    or what about doing a transaction? currently you have to do some nasy stuff with pauseDrain() and resumeDrain() which are themselves somewhat cludgey hacks I put on because I was mentally exhausted and planning a home remodel + my wedding. Well, I'm back now, refreshed, and want to make things better and all of our lives easier...

    pg.connect(/*constring*/, function(err, client, done) {
      client.query('begin', function(err) {
        if(err) return callback();
        client.query('update something', function(err) {
          client.query('commit', function() { done() });
        })
      });
    });
    

    Also, the 1st parameter (connection info) is optional. I think node-postgres should use the same environment variables as the psql command to get default connection info, and then supplement with pg.defaults and then override with custom stuff passed in. So if you use defaults or the environment variables, you can do this:

    pg.connect(function(client, done() {
      done();
    });
    

    The pool needs a cleaner way to shut itself down too without being destructive. I'm not sure how that should work currently.

    feedback

    I needs your feedback on this. Let's hear it!

    discussion bug 
    opened by brianc 37
  • Use `buffer-alloc-unsafe` to create emptyBuffer

    Use `buffer-alloc-unsafe` to create emptyBuffer

    Deprecation Warning when testing against node 7.0.0 rc1

    Using Buffer without new will soon stop working from node v7.0.0. Use new Buffer(), or preferably Buffer.from(), Buffer.allocUnsafe() or Buffer.alloc() instead.

    I know we shall support node prior to 6.x, so I use new Buffer() to replace Buffer().

    opened by JLHwung 33
  • Handling connection timeouts / dropped network / db failover

    Handling connection timeouts / dropped network / db failover

    Hello,

    I'm working on setting up a health check within our system, and have noticed that our Postgres implementation doesn't seem to handle connection timeouts, dropped network, or a db failover event very gracefully (at least in the way it works when using a multi-az deployment in Amazon RDS). The issue is very similar to one that was fixed in the mysql package a while back -- https://github.com/mysqljs/mysql/issues/821.

    We effectively have a class that looks similar to this:

    const Promise = require('bluebird');
    const pg = require('pg');
    
    class PostgresSQLInterface extends Service {
        constructor(dbConnectionOptions, logger) {
            const defaults = {
                host: 'localhost',
                port: '5432',
    
                user: '',
                password: null,
    
                max: 10, // Poolsize
                min: 10,
    
                keepAlive: true,
                idleTimeoutMillis: 10000
            };
    
            this.state = {
                config: _.merge({}, defaults, dbConnectionOptions)
            };
    
            this.createDatabasePool();
        }
    
        createDatabasePool() {
            this.state.pool = new pg.Pool(this.state.config);
    
            this.state.pool.on('connect', () => {
                this.state.healthy = true;
                console.log('HEALTHY');
            });
    
            this.state.pool.on('error', () => {
                this.state.healthy = false;
                console.log('UNHEALTHY');
            });
        }
    
        *getDatabaseConnection() {
            try {
                const connection = yield this.state.pool.connect();
    
                return connection;
            }
            catch (error) {
                throw new Errors.DatabaseError("Could not connect to Postgres", {
                    originalError: error
                });
            }
        }    
    };
    

    In a normal environment, when our application connects, I see it spit out "HEALTHY" x the number of connections it made, as expected. However, there are a few issues:

    1.) If the connection is severed (I turn off my wireless, kill my VPN, or trigger a reboot on the RDS instance), no error events are raised even though the documentation for pg-pool states an error is "Emitted whenever an idle client in the pool encounters an error. This is common when your PostgreSQL server shuts down, reboots, or a network partition otherwise causes it to become unavailable while your pool has connected clients." My expectation would be to see a string of "UNHEALTHY" statements.

    2.) Similarly, if I initiate a failover in RDS, no error events are raised but I am unable to run queries. This may be due to how AWS handles the DNS entries around multi-az deployments, but I cannot test this while issue #1 remains unresolved.

    3.) Calling getDatabaseConnection when no replies are received from postgres (sudo iptables -A INPUT -p tcp --source-port 5432 -j DROP, sudo iptables -F afterwards to restore) hangs on grabbing a connection, as there is no timeout setting.

    Am I missing a setting in my configuration, or is this a situation that just hasn't come up yet for someone else? If it's the latter, I'd be more than happy to create a fix for the issue, but want to make sure I'm not overlooking something first.

    Node version: 6.2.x PG version: 6.0.2 Postgres version: 9.5.x

    Thanks!

    opened by jessedpate 33
  • pg client fails to connect (silently) using Node 14

    pg client fails to connect (silently) using Node 14

    The pg client seems to fail quietly when connecting to postgress when using Node 14.x. Tested using Docker.

    Dockerfile

    FROM node:14.0.0-alpine3.10 as builder
    RUN apk add postgresql-client
    WORKDIR /src
    COPY . .
    ENTRYPOINT [ "/bin/sh" ]
    

    package.json

    {
      "devDependencies": {
        "pg": "^8.3.2",
        "ts-node": "^8.10.2",
        "typescript": "^3.7.5"
      }
    }
    

    test-pg-client.ts

    const { Client } = require('pg');
    
    start();
    
    async function start() {
        const conString = "postgres://postgres:(password)@localhost:5432/postgres";
    
        const client = new Client(conString);
        await client.connect();
    
        const query = await client.query('select 1');
    
        query.rows.forEach(value => console.info(`row value`, value));
    
        await client.end();
    }
    

    Since we're using Docker, let's build and run the image

    docker build -t my-image .
    docker run -it --network=host my-image
    

    (this runs the image with host network access, allowing you to connect to a postgres database that is running on the same machine. )

    Expected Result (while inside the container):

    ❯ yarn install
    ❯ ts-node test-pg-client.ts
    row value { '?column?': 1 }
    

    Actual Result:

    ❯ ts-node test-pg-client.ts
    
    

    (no errors, no messages, just nothing)

    The behavior is remedied by changing the first line in Dockerfile to the following:

    FROM node:12.18.3-alpine3.12 as builder
    

    This behavior seems similar to https://github.com/brianc/node-postgres/issues/2180 but wasn't totally sure if the circumstances were the same, so chose to make a new issue just in case.

    waiting for more info 
    opened by martinbliss 31
  • Doesn't work under Node.js 6.0.0

    Doesn't work under Node.js 6.0.0

    If we take the example on the main page:

    var pg = require('pg');
    var conString = "postgres://username:password@localhost/database";
    
    //this initializes a connection pool
    //it will keep idle connections open for a (configurable) 30 seconds
    //and set a limit of 10 (also configurable)
    pg.connect(conString, function(err, client, done) {
      if(err) {
        return console.error('error fetching client from pool', err);
      }
      client.query('SELECT $1::int AS number', ['1'], function(err, result) {
        //call `done()` to release the client back to the pool
        done();
    
        if(err) {
          return console.error('error running query', err);
        }
        console.log(result.rows[0].number);
        //output: 1
      });
    });
    

    And simply switch to Node.js 6.0.0, we are immediately getting an error:

    error fetching client from pool { error: password authentication failed for user "postgres"
        at Connection.parseE (D:\NodeJS\tests\node_modules\pg\lib\connection.js:539:11)
        at Connection.parseMessage (D:\NodeJS\tests\node_modules\pg\lib\connection.js:366:17)
        at Socket.<anonymous> (D:\NodeJS\tests\node_modules\pg\lib\connection.js:105:22)
        at emitOne (events.js:96:13)
        at Socket.emit (events.js:188:7)
        at readableAddChunk (_stream_readable.js:172:18)
        at Socket.Readable.push (_stream_readable.js:130:10)
        at TCP.onread (net.js:535:20)
      name: 'error',
      length: 115,
      severity: 'FATAL',
      code: '28P01',
      detail: undefined,
      hint: undefined,
      position: undefined,
      internalPosition: undefined,
      internalQuery: undefined,
      where: undefined,
      schema: undefined,
      table: undefined,
      column: undefined,
      dataType: undefined,
      constraint: undefined,
      file: 'src\\backend\\libpq\\auth.c',
      line: '304',
      routine: 'auth_failed' }
    

    i.e. authentication doesn't work under the newly released Node.js 6.0.0

    My Test environment:

    • Windows 10, 64-bit
    • Node.js 6.0.0 (released)
    bug 
    opened by vitaly-t 31
  • Update pg Pool's secure context properly

    Update pg Pool's secure context properly

    Best security practices recommend refreshing TLS certificates often. Pool let's you set the secureContext like this:

      const pool = new pg.Pool({
        host: config.postgres.host,
        port: config.postgres.port,
        user: config.postgres.user,
        password: config.postgres.password || undefined,
        database: config.postgres.database,
        ssl: config.postgres.tls_enabled
          ? {
              rejectUnauthorized: config.postgres.tls_verify_server_certificate,
              secureContext: certManager.tlsServices.postgres.secureContext,
            }
          : 
    

    But there is no way to update the secure context without re-creating the entire pool. We solve this by doing:

    pool.options.ssl.secureContext = context; // context is here a new Secure Context
    

    But options is private in the TypeScript files, and possibly not intended to be changed.

    Would it make sense to add a functionality to the Pool to update the secure context, like setSecureContext as to mimic the Node.js API for setting secure contexts? Or are we expected to always re-create the pool?

    opened by thernstig 0
  • Connect to Redshift using ssl

    Connect to Redshift using ssl

    Hey, I am trying to connect to Redshift using ssl. Redshift cluster is configured with enable_ssl, when creating new client we using ssl: true. This works but is it using CA certificate of Redshift? Or how it connected without me adding CA certificate? What CA certificate is it using? like the this client is for Postgres sql or it's support Redshift officially as well?

    opened by Vic-tator 0
  • Migrating databases

    Migrating databases

    I'm wondering what library you suggest for migrating your postgres database when using node-postgres in your server. I've found a few that don't have a ton of reviews, so i was wondering what y'all use, especially @brianc as the creator of this repo. Native migration capabilities would be cool too!

    question 
    opened by jbenjoy2 0
  • Bump chai from 4.3.6 to 4.3.7

    Bump chai from 4.3.6 to 4.3.7

    Bumps chai from 4.3.6 to 4.3.7.

    Release notes

    Sourced from chai's releases.

    v4.3.7

    What's Changed

    Full Changelog: https://github.com/chaijs/chai/compare/v4.3.6...v4.3.7

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump mocha and @types/mocha

    Bump mocha and @types/mocha

    Bumps mocha and @types/mocha. These dependencies needed to be updated together. Updates mocha from 7.2.0 to 10.2.0

    Release notes

    Sourced from mocha's releases.

    v10.2.0

    10.2.0 / 2022-12-11

    :tada: Enhancements

    • #4945: API: add possibility to decorate ESM name before import (@​j0tunn)

    :bug: Fixes

    :book: Documentation

    v10.1.0

    10.1.0 / 2022-10-16

    :tada: Enhancements

    :nut_and_bolt: Other

    v10.0.0

    10.0.0 / 2022-05-01

    :boom: Breaking Changes

    :nut_and_bolt: Other

    ... (truncated)

    Changelog

    Sourced from mocha's changelog.

    10.2.0 / 2022-12-11

    :tada: Enhancements

    • #4945: API: add possibility to decorate ESM name before import (@​j0tunn)

    :bug: Fixes

    :book: Documentation

    10.1.0 / 2022-10-16

    :tada: Enhancements

    :nut_and_bolt: Other

    10.0.0 / 2022-05-01

    :boom: Breaking Changes

    :nut_and_bolt: Other

    ... (truncated)

    Commits

    Updates @types/mocha from 5.2.7 to 10.0.1

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump typescript from 4.8.4 to 4.9.4

    Bump typescript from 4.8.4 to 4.9.4

    Bumps typescript from 4.8.4 to 4.9.4.

    Release notes

    Sourced from typescript's releases.

    TypeScript 4.9.4

    For release notes, check out the release announcement.

    For the complete list of fixed issues, check out the

    Downloads are available on:

    Changes:

    • e2868216f637e875a74c675845625eb15dcfe9a2 Bump version to 4.9.4 and LKG.
    • eb5419fc8d980859b98553586dfb5f40d811a745 Cherry-pick #51704 to release 4.9 (#51712)
    • b4d382b9b12460adf2da4cc0d1429cf19f8dc8be Cherry-pick changes for narrowing to tagged literal types.
    • e7a02f43fce47e1a39259ada5460bcc33c8e98b5 Port of #51626 and #51689 to release-4.9 (#51627)
    • 1727912f0437a7f367d90040fc4b0b4f3efd017a Cherry-pick fix around visitEachChild to release-4.9. (#51544)

    This list of changes was auto generated.

    TypeScript 4.9

    For release notes, check out the release announcement.

    Downloads are available on:

    Changes:

    • 93bd577458d55cd720b2677705feab5c91eb12ce Bump version to 4.9.3 and LKG.
    • 107f832b80df2dc97748021cb00af2b6813db75b Update LKG.
    • 31bee5682df130a14ffdd5742f994dbe7313dd0e Cherry-pick PR #50977 into release-4.9 (#51363) [ #50872 ]
    • 1e2fa7ae15f8530910fef8b916ec8a4ed0b59c45 Update version to 4.9.2-rc and LKG.
    • 7ab89e5c6e401d161f31f28a6c555a3ba530910e Merge remote-tracking branch 'origin/main' into release-4.9
    • e5cd686defb1a4cbdb36bd012357ba5bed28f371 Update package-lock.json
    • 8d40dc15d1b9945837e7860320fdccfe27c40cad Update package-lock.json
    • 5cfb3a2fe344a5350734305193e6cc99516285ca Only call return() for an abrupt completion in user code (#51297)
    • a7a9d158e817fcb0e94dc1c24e0a401b21be0cc9 Fix for broken baseline in yieldInForInInDownlevelGenerator (#51345)
    • 7f8426f4df0d0a7dd8b72079dafc3e60164a23b1 fix for-in enumeration containing yield in generator (#51295)
    • 3d2b4017eb6b9a2b94bc673291e56ae95e8beddd Fix assertion functions accessed via wildcard imports (#51324)
    • 64d0d5ae140b7b26a09e75114517b418d6bcaa9f fix(51301): Fixing an unused import at the end of a line removes the newline (#51320)
    • 754eeb2986bde30d5926e0fa99c87dda9266d01b Update CodeQL workflow and configuration, fix found bugs (#51263)
    • d8aad262006ad2d2c91aa7a0e4449b4b83c57f7b Update package-lock.json
    • d4f26c840b1db76c0b25a405c8e73830a2b45cbc fix(51245): Class with parameter decorator in arrow function causes "convert to default export" refactoring failure (#51256)
    • 16faf45682173ea437a50330feb4785578923d7f Update package-lock.json
    • 8b1ecdb701e2a2e19e9f8bcdd6b2beac087eabee fix(50654): "Move to a new file" breaks the declaration of referenced variable (#50681)
    • 170a17fad57eae619c5ef2b7bdb3ac00d6c32c47 Dom update 2022-10-25 (#51300)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
A PostgreSQL client with strict types, detailed logging and assertions.

Slonik A battle-tested PostgreSQL client with strict types, detailed logging and assertions. (The above GIF shows Slonik producing query logs. Slonik

Gajus Kuizinas 3.6k Jan 3, 2023
Execute one command (or mount one Node.js middleware) and get an instant high-performance GraphQL API for your PostgreSQL database!

PostGraphile Instant lightning-fast GraphQL API backed primarily by your PostgreSQL database. Highly customisable and extensible thanks to incredibly

Graphile 11.7k Jan 4, 2023
A simple Node.js ORM for PostgreSQL, MySQL and SQLite3 built on top of Knex.js

bookshelf.js Bookshelf is a JavaScript ORM for Node.js, built on the Knex SQL query builder. It features both Promise-based and traditional callback i

Bookshelf.js 6.3k Jan 2, 2023
TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite databases.

TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite datab

MikroORM 5.4k Dec 31, 2022
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server & SQLite

Prisma Quickstart • Website • Docs • Examples • Blog • Slack • Twitter • Prisma 1 What is Prisma? Prisma is a next-generation ORM that consists of the

Prisma 28k Jan 2, 2023
PostgreSQL interface for Node.js

pg-promise PostgreSQL interface for Node.js About Support & Sponsorship Documentation Contributing Usage Methods Query Formatting Index Variables Name

Vitaly Tomilov 3.2k Jan 6, 2023
A Node.js ORM for MySQL, SQLite, PostgreSQL, MongoDB, GitHub and serverless service like Deta, InspireCloud, CloudBase, LeanCloud.

Dittorm A Node.js ORM for MySQL, SQLite, PostgreSQL, MongoDB, GitHub and serverless service like Deta, InspireCloud, CloudBase, LeanCloud. Installatio

Waline 21 Dec 25, 2022
A Node.js library for retrieving data from a PostgreSQL database with an interesting query language included.

RefQL A Node.js library for retrieving data from a PostgreSQL database with an interesting query language included. Introduction RefQL is about retrie

Rafael Tureluren 7 Nov 2, 2022
ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.

TypeORM is an ORM that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo, and Electron platforms and can be used

null 30.1k Jan 3, 2023
A query builder for PostgreSQL, MySQL and SQLite3, designed to be flexible, portable, and fun to use.

knex.js A SQL query builder that is flexible, portable, and fun to use! A batteries-included, multi-dialect (MSSQL, MySQL, PostgreSQL, SQLite3, Oracle

knex 16.9k Jan 4, 2023
NodeJS PostgreSQL database performance insights. Locks, index usage, buffer cache hit ratios, vacuum stats and more.

Node Postgres Extras NodeJS port of Heroku PG Extras with several additions and improvements. The goal of this project is to provide powerful insights

Paweł Urbanek 68 Nov 14, 2022
A simple url shorter API built with nodejs running on Kubernetes in Google Cloud, using PostgreSQL for storage and cloud sql proxy.

Simple URL Shorter - Google Cloud - Kubernetes A simple url shorter API built with nodejs running on Kubernetes in Google Cloud, using PostgreSQL for

null 3 Nov 25, 2021
Database manager for MySQL, PostgreSQL, SQL Server, MongoDB, SQLite and others. Runs under Windows, Linux, Mac or as web application

Database manager for MySQL, PostgreSQL, SQL Server, MongoDB, SQLite and others. Runs under Windows, Linux, Mac or as web application

DbGate 2k Dec 30, 2022
just a graphql example created by typescript + fastify + mikro-orm(postgresql) + mercurius(graphql adaptor) + type-graphql

fastify-mikro-orm-mercurius-graphql-example A MikroORM boilerplate for GraphQL made with Fastify, Mercurius, Typescript using TypeGraphQL ?? Packages

Vigen 10 Aug 28, 2022
A tiny wrapper around pg that makes PostgreSQL a lot of fun to use. Written in TypeScript.

A tiny wrapper around pg that makes PostgreSQL a lot of fun to use. Written in TypeScript.

Mojolicious 8 Nov 29, 2022
Validate and auto-generate TypeScript types from raw SQL queries in PostgreSQL.

SafeQL Write SQL Queries With Confidence • Get started Install I would first recommend follow the instructions in the documentation. npm install --sav

null 747 Dec 28, 2022
A pure node.js JavaScript Client implementing the MySQL protocol.

mysql Table of Contents Install Introduction Contributors Sponsors Community Establishing connections Connection options SSL options Connection flags

null 17.6k Jan 1, 2023
🚀 A robust, performance-focused and full-featured Redis client for Node.js.

A robust, performance-focused and full-featured Redis client for Node.js. Supports Redis >= 2.6.12 and (Node.js >= 6). Completely compatible with Redi

Zihua Li 11.6k Jan 8, 2023
Microsoft SQL Server client for Node.js

node-mssql Microsoft SQL Server client for Node.js Supported TDS drivers: Tedious (pure JavaScript - Windows/macOS/Linux, default) Microsoft / Contrib

null 2.1k Jan 4, 2023