Skip to content

wmfs/pg-concat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published