0.0.6 • Published 6 years ago

pg-concat v0.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

pg-concat

JavaScript Style Guide license

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

0.0.6

6 years ago

0.0.5

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago