@synor/database-postgresql

v0.5.2
Synor Database Engine - PostgreSQL
synor synor-database postgresql postgres pg

Synor Database Version Coverage License

Synor Database PostgreSQL

Synor Database Engine - PostgreSQL

Installation

# using yarn:
yarn add @synor/database-postgresql pg

# using npm:
npm install --save @synor/database-postgresql pg

URI

Format: postgresql://[user[:password]@][hostname][:port]/database[?param=value&...]

Params:

Name Description Default Value
schema PostgreSQL Schema public
ssl SSL configuration false
synor_migration_record_table Name for Migration Record Table synor_migration_record

Examples:

// SSL Example

const ssl = {
  ca: '<path-to-file>',
  cert: '<path-to-file>',
  key: '<path-to-file>',
  passphrase: '<string>',
  rejectUnauthorized: '<boolean>',
  secureOptions: '<number>',
}

const uri = `postgresql://postgres:[email protected]:5432/synor?ssl=${encodeURIComponent(
  JSON.stringify(ssl)
)}`

License

Licensed under the MIT License. Check the LICENSE file for details.

npm i @synor/database-postgresql

Metadata

  • MIT
  • Whatever
  • Munif Tanjim
  • released 3/5/2021

Downloads

Maintainers