WebService::SQLFormat - Format SQL via the sqlformat.org API
version 0.000007
use strict; use warnings; use feature qw( say ); use WebService::SQLFormat; my $formatter = WebService::SQLFormat->new( identifier_case => 'upper', reindent => 1, ); my $sql = shift @ARGV; say $formatter->format_sql($sql);
An integer between 0 and 8. Used to set debugging level for LWP::ConsoleLogger::Easy. Defaults to 0.
Case to use for SQL identifiers. One of 'upper', 'lower' or 'capitalize'. If no value is supplied, identifiers will not be changed.
Case to use for SQL keywords. One of 'upper', 'lower' or 'capitalize'. If no value is supplied, case will not be changed.
Re-indent supplied SQL. Defaults to 0.
Remove SQL comments. Defaults to 0.
You may supply your own user agent. Must be of the LWP::UserAgent family.
The API url to query. Defaults to https://sqlformat.org/api/v1/format
This method expects a scalar containing the SQL which you'd like to format. Returns the formatted SQL.
BETA BETA BETA. Subject to change.
This module is a thin wrapper around https://sqlformat.org
Olaf Alders <olaf@wundercounter.com>
This software is copyright (c) 2016-2017 by Olaf Alders.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WebService::SQLFormat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::SQLFormat
CPAN shell
perl -MCPAN -e shell install WebService::SQLFormat
For more information on module installation, please visit the detailed CPAN module installation guide.