Last active
July 25, 2016 13:29
-
-
Save dramaturg/ec718bc8b6ebe66b1c85899d6fb74ba5 to your computer and use it in GitHub Desktop.
Quick n' dirty SQL beautifier with SQL::Beautify
This file contains 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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use SQL::Beautify; | |
my $sql = SQL::Beautify->new(uc_keywords => 1); | |
my $inp = do { local $/; <STDIN> }; | |
$sql->query($inp); | |
print $sql->beautify; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment