Last active
December 14, 2021 05:06
-
-
Save jeiea/e8a58f8c8c5b6903053c4eacd800f684 to your computer and use it in GitHub Desktop.
deno sql formatter for dbeaver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// deno run sql_format.ts | |
import { format } from "http://esm.sh/[email protected]"; | |
import { readAll, writeAll } from "https://deno.land/[email protected]/io/mod.ts"; | |
const input = await readAll(Deno.stdin); | |
const unformatted = new TextDecoder().decode(input); | |
const formatted = format(unformatted, { language: "mysql" }); | |
await writeAll(Deno.stdout, new TextEncoder().encode(formatted)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment