Top Description Fields Constructors Methods
org.postgresql.jdbc

public final Class EscapedFunctions2

extends Object
Class Inheritance
Imports
org.postgresql.util.GT, .PSQLException, .PSQLState, org.checkerframework.checker.nullness.qual.Nullable, java.lang.reflect.Method, java.sql.SQLException, java.util.List, .Locale, java.util.concurrent.ConcurrentHashMap, .ConcurrentMap

This class stores supported escaped function.

Note

this is a pgjdbc-internal class, so it is not supposed to be used outside of the driver.

Field Summary

Modifier and TypeField and Description
private static final ConcurrentMap<String, Method>
FUNCTION_MAP

storage for functions implementations

private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
appendCall(StringBuilder
destination StringBuilder
sb
,
String
begin string
begin
,
String
separator string
separator
,
String
end string
end
,
List<? extends CharSequence>
arguments
args
)

Appends begin arg0 separator arg1 separator end sequence to the input StringBuilder

private static void
private static boolean
private static boolean

Returns:

true when both intervals are equal (case insensitive)
areSameTsi
(String
first interval to compare
a
,
String
second interval to compare
b
)

Compares two TSI intervals.

private static String
private static ConcurrentMap<String, Method>
public static @Nullable Method

Returns:

a Method object or null if not found
getFunction
(String
name of the searched function
functionName
)

get Method object implementing the given function

private static boolean

Returns:

true if interval.startsWithIgnoreCase(SQL_TSI_ROOT)
isTsi
(String
input string
interval
)

Checks if given input starts with SQL_TSI_ROOT

private static void
singleArgumentFunctionCall(StringBuilder buf, String call, String functionName, List<? extends CharSequence> parsedArgs)

public static void
sqlceiling(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

ceiling to ceil translation

public static void
sqlchar(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

char to chr translation

public static void
sqlconcat(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

concat translation

public static void
sqlcurdate(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

curdate to current_date translation

public static void
sqlcurtime(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

curtime to current_time translation

public static void
sqldatabase(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

database translation

public static void
sqldayname(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

dayname translation

public static void
sqldayofmonth(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

dayofmonth translation

public static void
sqldayofweek(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

dayofweek translation adding 1 to postgresql function since we expect values from 1 to 7

public static void
sqldayofyear(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

dayofyear translation

public static void
sqlhour(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

hour translation

public static void
sqlifnull(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

ifnull translation

public static void
sqlinsert(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

insert to overlay translation

public static void
sqllcase(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

lcase to lower translation

public static void
sqlleft(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

left to substring translation

public static void
sqllength(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

length translation

public static void
sqllocate(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

locate translation

public static void
sqllog(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

log to ln translation

public static void
sqllog10(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

log10 to log translation

public static void
sqlltrim(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

ltrim translation

public static void
sqlminute(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

minute translation

public static void
sqlmonth(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

month translation

public static void
sqlmonthname(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

monthname translation

public static void
sqlpower(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

power to pow translation

public static void
sqlquarter(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

quarter translation

public static void
sqlright(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

right to substring translation

public static void
sqlrtrim(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

rtrim translation

public static void
sqlsecond(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

second translation

public static void
sqlspace(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

space translation

public static void
sqlsubstring(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

substring to substr translation

public static void
sqltimestampadd(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

time stamp add

public static void
sqltimestampdiff(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

time stamp diff

public static void
sqltruncate(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

truncate to trunc translation

public static void
sqlucase(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

ucase to upper translation

public static void
sqluser(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

user translation

public static void
sqlweek(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

week translation

public static void
sqlyear(StringBuilder
The buffer to append into
buf
,
List<? extends CharSequence>
arguments
parsedArgs
)

year translation

private static void
twoArgumentsFunctionCall(StringBuilder buf, String call, String functionName, List<? extends CharSequence> parsedArgs)

private static void
zeroArgumentFunctionCall(StringBuilder buf, String call, String functionName, List<? extends CharSequence> parsedArgs)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait