# pg-concat

> Takes an object with parts from table and outputs sql statement.

Latest version **0.0.6** (published 2018-03-20) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install pg-concat
pnpm add pg-concat
yarn add pg-concat
bun add pg-concat
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2018-03-20 |
| First published | 2017-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 (+9 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 121 |
| Author | Meena Hoda |
| Maintainers | timneedham |
| Keywords | pg, postgresql |

## Links

- npm: https://www.npmjs.com/package/pg-concat
- Repository: https://github.com/wmfs/tymly
- Homepage: https://github.com/wmfs/tymly#readme
- Issues: https://github.com/wmfs/tymly/issues
- npm.io page: https://npm.io/package/pg-concat

## Dependencies (4)

- [boom](https://npm.io/package/boom.md) 7.2.0
- [async](https://npm.io/package/async.md) 2.6.0
- [debug](https://npm.io/package/debug.md) 3.1.0
- [lodash](https://npm.io/package/lodash.md) 4.17.5

## Recent versions

- 0.0.6 (latest) — 2018-03-20
- 0.0.5 — 2017-10-06
- 0.0.3 — 2017-09-10
- 0.0.2 — 2017-08-19

## README

# pg-concat
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/wmfs/tymly/blob/master/packages/pg-concat/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)'
```

## <a name="install"></a>Install
```bash
$ npm install pg-concat --save
```

## <a name="license"></a>License
[MIT](https://github.com/wmfs/pg-concat/blob/master/LICENSE)

---
_Source: https://npm.io/package/pg-concat · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
