DDLFormatterImpl (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.engine.jdbc.internal
Class DDLFormatterImpl

    java.lang.Object
      org.hibernate.engine.jdbc.internal.DDLFormatterImpl

All Implemented Interfaces:
  Formatter

    public class DDLFormatterImpl

extends Object
implements Formatter

Performs formatting of DDL SQL statements.

Constructor Summary
`DDLFormatterImpl()`

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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DDLFormatterImpl

    public DDLFormatterImpl()

Method Detail

### 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.
  Returns:
    The formatted version

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.