@wmfs/pg-concat
Takes an object with parts from table and outputs sql statement.
Last updated a year ago by wmfsbot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @wmfs/pg-concat 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.14.0                                ...           latest (2 months ago)

15 Versions

  • 1.14.0                                ...           2 months ago
  • 1.13.0                                ...           4 months ago
  • 1.12.0                                ...           5 months ago
  • 1.11.0                                ...           6 months ago
  • 1.10.0                                ...           10 months ago
  • 1.9.0                                ...           a year ago
  • 1.8.0                                ...           2 years ago
  • 1.7.0                                ...           2 years ago
  • 1.6.0                                ...           2 years ago
  • 1.5.0                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |