com.github.drinkjava2.jdialects
Class DialectFunctionTranslator
java.lang.Object
com.github.drinkjava2.jdialects.DialectFunctionTranslator
public class DialectFunctionTranslator
- extends Object
TranslateUtil parse a Sql, translate all universal functions like fn_sin() to
native SQL functions like sin()
- Since:
- 1.0.0
- Author:
- Yong Zhu (Yong9981@gmail.com)
|
Constructor Summary |
DialectFunctionTranslator()
Register functions names need translated, values is percentage of dialects
support this function, value not used for this project |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
public static final DialectFunctionTranslator instance
DialectFunctionTranslator
public DialectFunctionTranslator()
- Register functions names need translated, values is percentage of dialects
support this function, value not used for this project
getFunctionMap
public Map<String,Integer> getFunctionMap()
setFunctionMap
public void setFunctionMap(Map<String,Integer> functionMap)
doTranslate
public String doTranslate(Dialect d,
String sql)
- Translate universal SQL to native SQL, all #xxx() format universal SQL
functions will be translate to xxx() native SQL functions
deleteItem
public static void deleteItem(DialectFunctionTranslator.SqlItem item)
deleteItem
public static void deleteItem(DialectFunctionTranslator.SqlItem lastItem,
DialectFunctionTranslator.SqlItem nextItem)
isLetterNumber
public static boolean isLetterNumber(char c)
Copyright © 2018. All rights reserved.