gudusoft.gsqlparser.pp.stmtformatter
Class FormatterFactory
java.lang.Object
gudusoft.gsqlparser.pp.stmtformatter.FormatterFactory
public class FormatterFactory
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormatterFactory
public FormatterFactory()
createSelectStmtFormatter
public static SelectStmtFormatter createSelectStmtFormatter(GFmtOpt opt)
- create select statment formatter
- Parameters:
opt
- options
- Returns:
- instance
createInsertStmtFormatter
public static InsertStmtFormatter createInsertStmtFormatter(GFmtOpt opt)
createDeleteStmtFormatter
public static DeleteStmtFormatter createDeleteStmtFormatter(GFmtOpt opt)
createUpdateStmtFormatter
public static UpdateStmtFormatter createUpdateStmtFormatter(GFmtOpt opt)
createCreateTableStmtFormatter
public static CreateTableStmtFormatter createCreateTableStmtFormatter(GFmtOpt opt)
createDeclareStmtFormatter
public static DeclareStmtFormatter createDeclareStmtFormatter(GFmtOpt opt)
createExecuteStmtFormatter
public static ExecuteStmtFormatter createExecuteStmtFormatter(GFmtOpt opt)
createSetStmtFormatter
public static SetStmtFormatter createSetStmtFormatter(GFmtOpt opt)
createIfStmtFormatter
public static IfStmtFormatter createIfStmtFormatter(GFmtOpt opt)
createCreateFunctionStmtFormatter
public static CreateFunctionStmtFormatter createCreateFunctionStmtFormatter(GFmtOpt opt)
createGoStmtFormatter
public static GoStmtFormatter createGoStmtFormatter(GFmtOpt opt)
createCompactModeStmtFormatter
public static CompactModeStmtFormatter createCompactModeStmtFormatter(GFmtOpt opt)
createReturnStmtFormatter
public static ReturnStmtFormatter createReturnStmtFormatter(GFmtOpt opt)
createCreateViewStmtFormatter
public static CreateViewStmtFormatter createCreateViewStmtFormatter(GFmtOpt opt)
createAlterTableStatement
public static AlterTableStmtFormatter createAlterTableStatement(GFmtOpt opt)
createFormatter
public static <E extends AbstractStmtFormatter> E createFormatter(GFmtOpt opt,
java.lang.Class<E> clazz,
FormatterFactory.IFormatterBuilderCreator<E> creater)
- create the formatter
- Type Parameters:
E
- - Parameters:
opt
- clazz
- creater
-
- Returns:
processStatement
public static void processStatement(GFmtOpt option,
TCustomSqlStatement sql)
isNotNeedFormat
public static boolean isNotNeedFormat(TCustomSqlStatement sql)
isNotNeedFormat
public static boolean isNotNeedFormat(TSourceToken t)
processBlockStmt
public static void processBlockStmt(GFmtOpt opt,
TMssqlBlock stmt,
TSourceToken ifToken)
pp
public static java.lang.String pp(TGSqlParser parser,
GFmtOpt option)
getOutputConfig
public static OutputConfig getOutputConfig()
setOutputConfig
public static void setOutputConfig(OutputConfig outputConfig)
createAllStmtsFormatter
public static AllStmtsFormatter createAllStmtsFormatter(GFmtOpt option)
clearAllObject
public static void clearAllObject(java.lang.String sessionId)
clear
public static void clear(java.lang.String sessionId)