@wmfs/pg-concat

1.17.0 • Public • Published

pg-concat

Tymly Package npm (scoped) CircleCI codecov CodeFactor Dependabot badge Commitizen friendly JavaScript Style Guide license FOSSA Status

Takes an array of parts and returns the necessary PostgreSQL expression to concatenate them.

Usage

const pgConcat = require('pg-concat')

const concatString = pgConcat(
    [
        { columnName: 'incident_no' },
        '/',
        { columnName: 'year', default: 1900 },
    ]
)

// concatString = 'incident_no||'/'||COALESCE(year, 1900)'

Install

$ npm install pg-concat --save

License

MIT

FOSSA Status

Dependents (0)

Package Sidebar

Install

npm i @wmfs/pg-concat

Weekly Downloads

0

Version

1.17.0

License

MIT

Unpacked Size

9.26 kB

Total Files

8

Last publish

Collaborators

  • wmfsbot