public class DefaultSqlFormatter extends Object implements SqlFormatter
SqlFormatter| コンストラクタと説明 |
|---|
DefaultSqlFormatter() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
String |
format(String sql,
Database db,
Set<Table> references)
Return a HTML-formatted representation of the specified SQL.
|
Set<String> |
getKeywords(DatabaseMetaData meta) |
protected Set<Table> |
getReferencedTables(String sql,
Database db)
Returns a
Set of tables/views that are possibly referenced
by the specified SQL. |
protected Map<String,Table> |
getTableMap(Collection<? extends Table> tables,
String dbName)
Returns a
Map of the specified tables/views
keyed by several possible ways to refer to the table. |
protected Map<String,Table> |
getTableMap(Database db)
Returns a
Map of all tables/views in the database
keyed by several possible ways to refer to the table. |
public String format(String sql, Database db, Set<Table> references)
format インタフェース内 SqlFormattersql - SQL to be formatteddb - Databasereferences - set of tables referenced by this SQL
(populated by the formatter) or left empty if the formatter already
provides references to those tablesprotected Set<Table> getReferencedTables(String sql, Database db)
Set of tables/views that are possibly referenced
by the specified SQL.sql - db - protected Map<String,Table> getTableMap(Database db)
Map of all tables/views in the database
keyed by several possible ways to refer to the table.db - protected Map<String,Table> getTableMap(Collection<? extends Table> tables, String dbName)
Map of the specified tables/views
keyed by several possible ways to refer to the table.tables - dbName - public Set<String> getKeywords(DatabaseMetaData meta)
meta - Copyright © 2016. All Rights Reserved.