Currently, I can format my SQL queries programmatically by making POST request to the http://sqlformat.org/api/v1/format API; but there is a limitation of 500 request can be served per hour from the single IP as mentioned here http://sqlformat.org/api/#usage.

I am wondering if there is a local Javascript or other mechanism available in by which I can achieve the same result as obtained from the SQLFormat.org website locally without going to the web?
There is a javascript library to do that https://github.com/zeroturnaround/sql-formatter
Usage:
import sqlFormatter from "sql-formatter";
console.log(sqlFormatter.format("SELECT * FROM table1"));
This will output:
SELECT
  *
FROM
  table1
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With