org.hibernate.jdbc.util

Class DDLFormatterImpl

Implemented Interfaces:
Formatter

public class DDLFormatterImpl
extends java.lang.Object
implements Formatter

Performs formatting of DDL SQL statements.
Authors:
Gavin King
Steve Ebersole

Method Summary

String
format(String sql)
Format an SQL statement using simple rules
  • Insert newline after each comma
  • Indent three spaces after each inserted newline
If the statement contains single/double quotes return unchanged, it is too complex and could be broken by simple formatting.

Method Details

format

public String format(String sql)
Format an SQL statement using simple rules
  • Insert newline after each comma
  • Indent three spaces after each inserted newline
If the statement contains single/double quotes return unchanged, it is too complex and could be broken by simple formatting.
Specified by:
format in interface Formatter
Parameters:
sql - The statement to be fornmatted.