Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@wmfs/pg-concat

1.14.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

Install

npm i @wmfs/pg-concat

DownloadsWeekly Downloads

2

Version

1.14.0

License

MIT

Unpacked Size

8.09 kB

Total Files

8

Last publish

Collaborators

  • avatar