1- # SQL Formatter [ ![ NPM version] ( https://img.shields.io/npm/v/sql-formatter .svg )] ( https://npmjs.com/package/sql-formatter ) [ ![ Build Status ] ( https://travis-ci.org/zeroturnaround/sql-formatter. svg?branch=master ) ]( https://travis-ci.org/zeroturnaround/sql-formatter ) [ ![ Coverage Status] ( https://coveralls.io/repos/github/zeroturnaround/sql-formatter /badge.svg?branch=master )] ( https://coveralls.io/github/zeroturnaround/sql-formatter ?branch=master )
1+ # SQL Formatter [ ![ NPM version] ( https://img.shields.io/npm/v/prettier-sql .svg )] ( https://npmjs.com/package/prettier-sql ) ![ Dev Build ] ( https://github.com/github/docs/actions/workflows/webpack.yaml/badge. svg?event=push& branch=develop ) ![ Prod Build ] ( https://github.com/github/docs/actions/workflows/webpack.yaml/badge.svg?event=push&branch=master ) [ ![ Coverage Status] ( https://coveralls.io/repos/github/inferrinizzard/prettier-sql /badge.svg?branch=master )] ( https://coveralls.io/github/inferrrinizzard/prettier-sql ?branch=master )
22
33** SQL Formatter** is a JavaScript library for pretty-printing SQL queries.
44It started as a port of a [ PHP Library] [ ] , but has since considerably diverged.
@@ -21,7 +21,7 @@ It does not support:
2121- Stored procedures.
2222- Changing of the delimiter type to something else than ` ; ` .
2323
24- → [ Try the demo.] ( https://zeroturnaround .github.io/sql-formatter / )
24+ → [ Try the demo.] ( https://inferrinizzard .github.io/prettier-sql / )
2525
2626# Table of contents
2727
@@ -37,15 +37,15 @@ It does not support:
3737Get the latest version from NPM:
3838
3939``` sh
40- npm install sql-formatter
40+ npm install prettier-sql
4141```
4242
4343## Usage
4444
4545### Usage as library
4646
4747``` js
48- import { format } from ' sql-formatter ' ;
48+ import { format } from ' prettier-sql ' ;
4949
5050console .log (format (' SELECT * FROM tbl' ));
5151```
@@ -97,11 +97,11 @@ WHERE
9797
9898### Usage from command line
9999
100- The CLI tool will be installed under ` sql-formatter `
101- and may be invoked via ` npx sql-formatter ` :
100+ The CLI tool will be installed under ` prettier-sql `
101+ and may be invoked via ` npx prettier-sql ` :
102102
103103``` sh
104- sql-formatter -h
104+ prettier-sql -h
105105```
106106
107107```
@@ -128,7 +128,7 @@ By default, the tool takes queries from stdin and processes them to stdout but
128128one can also name an input file name or use the ` --output ` option.
129129
130130``` sh
131- echo ' select * from tbl where id = 3' | sql-formatter
131+ echo ' select * from tbl where id = 3' | prettier-sql
132132```
133133
134134``` sql
@@ -184,7 +184,7 @@ npm run check
184184
185185## License
186186
187- [ MIT] ( https://github.com/zeroturnaround/sql-formatter /blob/master/LICENSE )
187+ [ MIT] ( https://github.com/inferrinizzard/prettier-sql /blob/master/LICENSE )
188188
189189[ php library ] : https://github.com/jdorn/sql-formatter
190190[ standard sql ] : https://en.wikipedia.org/wiki/SQL:2011
0 commit comments