0.0.6 • Published 7 years ago

pg-concat v0.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
7 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

7 years ago

0.0.5

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago