No release in over 3 years
Low commit activity in last 3 years
A tool for SQL formatting written in Ruby. Ruby port of Blanco SQL Formatter.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

anbt-sql-formatter¶ ↑

© 2010-2018 sonota88 (yosiot8753@gmail.com)

Description¶ ↑

A tool for SQL formatting ported from BlancoSqlFormatter.

Install¶ ↑

$ ruby setup.rb

Usage¶ ↑

$ echo "select a,b from c;" | anbt-sql-formatter
SELECT
        a
        , b
    FROM
        c
;
$

License¶ ↑

GNU Lesser General Public License.

Authors¶ ↑

sonota

Porting to Ruby

Following are Authors of BlancoSqlFormatter(original Java version).

渡辺義則 / Yoshinori WATANABE / A-san

Early development

伊賀敏樹 (Tosiki Iga / いがぴょん)

Maintainance

Customize¶ ↑

  • In AnbtSql::Rule:

    • Function names

    • Rules for linefeed and indentation

    • Characters for indentation

    • Upcase or Downcase

  • More farther: Override AnbtSql::Formatter#format_list_main_loop by inheritance or monkeypathcing.

Test¶ ↑

$ ./test.sh