# sqlformatter

> Performs formatting of basic SQL statements (DML + query).

Latest version **0.1.0** (published 2014-10-27) · LGPL-2.1 license · 0 weekly downloads

## Install

```sh
npm install sqlformatter
pnpm add sqlformatter
yarn add sqlformatter
bun add sqlformatter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-10-27 |
| First published | 2014-10-27 |
| Weekly downloads | 0 |
| License | LGPL-2.1 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Borealis |
| Maintainers | pascalmartin |
| Keywords | sql, formatter |

## Links

- npm: https://www.npmjs.com/package/sqlformatter
- Repository: https://github.com/boreal-is/sqlformater
- Issues: https://github.com/boreal-is/sqlformater/issues
- npm.io page: https://npm.io/package/sqlformatter

## Alternatives

- [@libsql/sqlite3](https://npm.io/package/@libsql/sqlite3.md) — 39.8K weekly downloads
- [@fortemi/core](https://npm.io/package/@fortemi/core.md) — 461 weekly downloads
- [cdb-converter](https://npm.io/package/cdb-converter.md) — 341 weekly downloads
- [@uplo/adapter-prisma](https://npm.io/package/@uplo/adapter-prisma.md) — 75 weekly downloads
- [typeorm-aios](https://npm.io/package/typeorm-aios.md) — 30 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2014-10-27

## README

Performs formatting of basic SQL statements (DML + query).

Direct conversion in javascript of this hibernate java code from
http://grepcode.com/file/repo1.maven.org/maven2/org.hibernate/hibernate-core/4.3.6.Final/org/hibernate/engine/jdbc/internal/BasicFormatterImpl.java#BasicFormatterImpl

### Installation

```bash
$ npm install sqlformatter
```

###Examples

```js
var sqlformatter = require('sqlformatter')
var sql = "select * from dual";

console.log(sqlformatter.format(sql));
```
Output:
```
 select
     *
 from
     dual
```

###Tests

To run the test suite, first install the dependancies, then run npm test:
```bash
$ npm install
$ npm test
```

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