sql-formatter-dsi

1.0.3 • Public • Published

Console util for formatting SQL using lib sql-formatter. Zero dependencies


SYNOPSIS

$ sql-formatter-dsi -h
SQL formatter

Options:
  -w, --overwrite  Load a file and overwrite it. "-" - stdin   
  -i, --file  Load a file. "-" - stdin                                                                       [default: "-"]
  -s, --sql   Sql dialect: "sql" Standard SQL, "n1ql" Couchbase N1QL, "db2" IBM DB2, "pl/sql" Oracle PL/SQL  [default: "sql"]
  -o, --out   Output file name. "-" - stdout                                                                 [default: "-"]

$ echo "SELECT * FROM databases WHERE category='NoSQL'" | sql-formatter-dsi
SELECT
  *
FROM
  databases
WHERE
  category = 'NoSQL'

INSTALL

This tool require Node.js to be installed. After you can install using npm:

npm i -g sql-formatter-dsi

THANKS

This is a fork from Olexandr Sydorchuk sql-formatter-cli, adapted to be implemented for pre-commit plugin.

Package Sidebar

Install

npm i sql-formatter-dsi

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

125 kB

Total Files

4

Last publish

Collaborators

  • ammarshadiq