Package ai.heavy.jdbc
Class HeavyAIEscapeFunctions
- java.lang.Object
-
- ai.heavy.jdbc.HeavyAIEscapeFunctions
-
public final class HeavyAIEscapeFunctions extends Object
-
-
Constructor Summary
Constructors Constructor Description HeavyAIEscapeFunctions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidappendCall(StringBuilder sb, String begin, String separator, String end, List<? extends CharSequence> args)Appendsbegin arg0 separator arg1 separator endsequence to the inputStringBuilderstatic MethodgetFunction(String functionName)get Method object implementing the given functionstatic voidsqlceiling(StringBuilder buf, List<? extends CharSequence> parsedArgs)ceiling to ceil translationstatic voidsqldayofmonth(StringBuilder buf, List<? extends CharSequence> parsedArgs)dayofmonth translationstatic voidsqldayofweek(StringBuilder buf, List<? extends CharSequence> parsedArgs)dayofweek translation adding 1 to postgresql function since we expect values from 1 to 7static voidsqldayofyear(StringBuilder buf, List<? extends CharSequence> parsedArgs)dayofyear translationstatic voidsqlhour(StringBuilder buf, List<? extends CharSequence> parsedArgs)hour translationstatic voidsqlminute(StringBuilder buf, List<? extends CharSequence> parsedArgs)minute translationstatic voidsqlmonth(StringBuilder buf, List<? extends CharSequence> parsedArgs)month translationstatic voidsqlquarter(StringBuilder buf, List<? extends CharSequence> parsedArgs)quarter translationstatic voidsqlsecond(StringBuilder buf, List<? extends CharSequence> parsedArgs)second translationstatic voidsqlweek(StringBuilder buf, List<? extends CharSequence> parsedArgs)week translationstatic voidsqlyear(StringBuilder buf, List<? extends CharSequence> parsedArgs)year translation
-
-
-
Method Detail
-
getFunction
public static Method getFunction(String functionName)
get Method object implementing the given function- Parameters:
functionName- name of the searched function- Returns:
- a Method object or null if not found
-
sqlceiling
public static void sqlceiling(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException
ceiling to ceil translation- Parameters:
buf- The buffer to append intoparsedArgs- arguments- Throws:
SQLException- if something wrong happens
-
sqldayofmonth
public static void sqldayofmonth(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException
dayofmonth translation- Parameters:
buf- The buffer to append intoparsedArgs- arguments- Throws:
SQLException- if something wrong happens
-
sqldayofweek
public static void sqldayofweek(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException
dayofweek translation adding 1 to postgresql function since we expect values from 1 to 7- Parameters:
buf- The buffer to append intoparsedArgs- arguments- Throws:
SQLException- if something wrong happens
-
sqldayofyear
public static void sqldayofyear(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException
dayofyear translation- Parameters:
buf- The buffer to append intoparsedArgs- arguments- Throws:
SQLException- if something wrong happens
-
sqlhour
public static void sqlhour(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException
hour translation- Parameters:
buf- The buffer to append intoparsedArgs- arguments- Throws:
SQLException- if something wrong happens
-
sqlminute
public static void sqlminute(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException
minute translation- Parameters:
buf- The buffer to append intoparsedArgs- arguments- Throws:
SQLException- if something wrong happens
-
sqlmonth
public static void sqlmonth(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException
month translation- Parameters:
buf- The buffer to append intoparsedArgs- arguments- Throws:
SQLException- if something wrong happens
-
sqlquarter
public static void sqlquarter(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException
quarter translation- Parameters:
buf- The buffer to append intoparsedArgs- arguments- Throws:
SQLException- if something wrong happens
-
sqlsecond
public static void sqlsecond(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException
second translation- Parameters:
buf- The buffer to append intoparsedArgs- arguments- Throws:
SQLException- if something wrong happens
-
sqlweek
public static void sqlweek(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException
week translation- Parameters:
buf- The buffer to append intoparsedArgs- arguments- Throws:
SQLException- if something wrong happens
-
sqlyear
public static void sqlyear(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException
year translation- Parameters:
buf- The buffer to append intoparsedArgs- arguments- Throws:
SQLException- if something wrong happens
-
appendCall
public static void appendCall(StringBuilder sb, String begin, String separator, String end, List<? extends CharSequence> args)
Appendsbegin arg0 separator arg1 separator endsequence to the inputStringBuilder- Parameters:
sb- destination StringBuilderbegin- begin stringseparator- separator stringend- end stringargs- arguments
-
-