JSPM

@vulcan-sql/extension-driver-pg

0.8.1-dev.20230815.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 16
  • Score
    100M100P100Q88301F
  • License MIT

PG driver for Vulcan SQL

Package Exports

  • @vulcan-sql/extension-driver-pg
  • @vulcan-sql/extension-driver-pg/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@vulcan-sql/extension-driver-pg) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

extension-driver-pg

node-postgres driver for Vulcan SQL.

Install

  1. Install package

    npm i @vulcan-sql/extension-driver-pg
  2. Update vulcan.yaml, enable the extension.

    extensions:
      pg: '@vulcan-sql/extension-driver-pg'
  3. Create a new profile in profiles.yaml or in your profiles' paths.

    - name: pg # profile name
      type: pg
      connection:
       # Optional: The max rows we should fetch once.
       chunkSize: 100
       # Optional: Maximum number of clients the pool should contain.
       max: 10
       # Optional: Number of milliseconds a client must sit idle in the pool and not be checked out before it is disconnected from the backend and discarded.
       idleTimeoutMillis: 10000
       # Optional: Number of milliseconds to wait before timing out when connecting a new client by default this is 0 which means no timeout
       connectionTimeoutMillis: 0
       # Optional: The user to connect to database. Default process.env.PGUSER || process.env.USER
       user: string
       # Optional: Password to connect to database. default process.env.PGPASSWORD
       password: string
       # Optional: Server host. default process.env.PGHOST
       host: string
       # Optional: Name of database. default process.env.PGDATABASE || user
       database: string
       # Optional: Server port. default process.env.PGPORT
       port: 5432
       # Optional: Connection string.
       connectionString: postgres://user:password@host:5432/database
       # Optional: Passed directly to node.TLSSocket, supports all tls.connect options
       ssl: false
       # Optional: Number of milliseconds before a statement in query will time out, default is no timeout
       statement_timeout: 0
       # Optional: Number of milliseconds before a query call will timeout, default is no timeout
       query_timeout: 0
       # Optional: The name of the application that created this Client instance
       application_name: string
       # Optional: Number of milliseconds to wait for connection, default is no timeout
       connectionTimeoutMillis: 0
       # Optional: Number of milliseconds before terminating any session with an open idle transaction, default is no timeout
       idle_in_transaction_session_timeout: 0