com.amazon.redshift.jdbc

## Class EscapedFunctions2

- java.lang.Object
- - com.amazon.redshift.jdbc.EscapedFunctions2

    public final class EscapedFunctions2
    extends Object

This class stores supported escaped function. Note: this is a rsjdbc-internal class, so it is not supposed to be used outside of the driver.

### Constructor Summary

Constructors
Constructor and Description
`EscapedFunctions2()`

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `appendCall(StringBuilder sb, String begin, String separator, String end, List<? extends CharSequence> args)` Appends `begin arg0 separator arg1 separator end` sequence to the input `StringBuilder`
`static Method` `getFunction(String functionName)` get Method object implementing the given function
`static void` `sqlceiling(StringBuilder buf, List<? extends CharSequence> parsedArgs)` ceiling to ceil translation
`static void` `sqlchar(StringBuilder buf, List<? extends CharSequence> parsedArgs)` char to chr translation
`static void` `sqlconcat(StringBuilder buf, List<? extends CharSequence> parsedArgs)` concat translation
`static void` `sqlcurdate(StringBuilder buf, List<? extends CharSequence> parsedArgs)` curdate to current_date translation
`static void` `sqlcurtime(StringBuilder buf, List<? extends CharSequence> parsedArgs)` curtime to current_time translation
`static void` `sqldatabase(StringBuilder buf, List<? extends CharSequence> parsedArgs)` database translation
`static void` `sqldayname(StringBuilder buf, List<? extends CharSequence> parsedArgs)` dayname translation
`static void` `sqldayofmonth(StringBuilder buf, List<? extends CharSequence> parsedArgs)` dayofmonth translation
`static void` `sqldayofweek(StringBuilder buf, List<? extends CharSequence> parsedArgs)` dayofweek translation adding 1 to Redshift function since we expect values from 1 to 7
`static void` `sqldayofyear(StringBuilder buf, List<? extends CharSequence> parsedArgs)` dayofyear translation
`static void` `sqlhour(StringBuilder buf, List<? extends CharSequence> parsedArgs)` hour translation
`static void` `sqlifnull(StringBuilder buf, List<? extends CharSequence> parsedArgs)` ifnull translation
`static void` `sqlinsert(StringBuilder buf, List<? extends CharSequence> parsedArgs)` insert to overlay translation
`static void` `sqllcase(StringBuilder buf, List<? extends CharSequence> parsedArgs)` lcase to lower translation
`static void` `sqlleft(StringBuilder buf, List<? extends CharSequence> parsedArgs)` left to substring translation
`static void` `sqllength(StringBuilder buf, List<? extends CharSequence> parsedArgs)` length translation
`static void` `sqllocate(StringBuilder buf, List<? extends CharSequence> parsedArgs)` locate translation
`static void` `sqllog(StringBuilder buf, List<? extends CharSequence> parsedArgs)` log to ln translation
`static void` `sqllog10(StringBuilder buf, List<? extends CharSequence> parsedArgs)` log10 to log translation
`static void` `sqlltrim(StringBuilder buf, List<? extends CharSequence> parsedArgs)` ltrim translation
`static void` `sqlminute(StringBuilder buf, List<? extends CharSequence> parsedArgs)` minute translation
`static void` `sqlmonth(StringBuilder buf, List<? extends CharSequence> parsedArgs)` month translation
`static void` `sqlmonthname(StringBuilder buf, List<? extends CharSequence> parsedArgs)` monthname translation
`static void` `sqlpower(StringBuilder buf, List<? extends CharSequence> parsedArgs)` power to pow translation
`static void` `sqlquarter(StringBuilder buf, List<? extends CharSequence> parsedArgs)` quarter translation
`static void` `sqlright(StringBuilder buf, List<? extends CharSequence> parsedArgs)` right to substring translation
`static void` `sqlrtrim(StringBuilder buf, List<? extends CharSequence> parsedArgs)` rtrim translation
`static void` `sqlsecond(StringBuilder buf, List<? extends CharSequence> parsedArgs)` second translation
`static void` `sqlspace(StringBuilder buf, List<? extends CharSequence> parsedArgs)` space translation
`static void` `sqlsubstring(StringBuilder buf, List<? extends CharSequence> parsedArgs)` substring to substr translation
`static void` `sqltimestampadd(StringBuilder buf, List<? extends CharSequence> parsedArgs)` time stamp add
`static void` `sqltimestampdiff(StringBuilder buf, List<? extends CharSequence> parsedArgs)` time stamp diff
`static void` `sqltruncate(StringBuilder buf, List<? extends CharSequence> parsedArgs)` truncate to trunc translation
`static void` `sqlucase(StringBuilder buf, List<? extends CharSequence> parsedArgs)` ucase to upper translation
`static void` `sqluser(StringBuilder buf, List<? extends CharSequence> parsedArgs)` user translation
`static void` `sqlweek(StringBuilder buf, List<? extends CharSequence> parsedArgs)` week translation
`static void` `sqlyear(StringBuilder buf, List<? extends CharSequence> parsedArgs)` year translation

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### EscapedFunctions2

    public EscapedFunctions2()

### 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 into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqllog

    public static void sqllog(StringBuilder buf,
                              List<? extends CharSequence> parsedArgs)
                       throws SQLException

log to ln translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqllog10

    public static void sqllog10(StringBuilder buf,
                                List<? extends CharSequence> parsedArgs)
                         throws SQLException

log10 to log translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlpower

    public static void sqlpower(StringBuilder buf,
                                List<? extends CharSequence> parsedArgs)
                         throws SQLException

power to pow translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqltruncate

    public static void sqltruncate(StringBuilder buf,
                                   List<? extends CharSequence> parsedArgs)
                            throws SQLException

truncate to trunc translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlchar

    public static void sqlchar(StringBuilder buf,
                               List<? extends CharSequence> parsedArgs)
                        throws SQLException

char to chr translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlconcat

    public static void sqlconcat(StringBuilder buf,
                                 List<? extends CharSequence> parsedArgs)

concat translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments

#### sqlinsert

    public static void sqlinsert(StringBuilder buf,
                                 List<? extends CharSequence> parsedArgs)
                          throws SQLException

insert to overlay translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqllcase

    public static void sqllcase(StringBuilder buf,
                                List<? extends CharSequence> parsedArgs)
                         throws SQLException

lcase to lower translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlleft

    public static void sqlleft(StringBuilder buf,
                               List<? extends CharSequence> parsedArgs)
                        throws SQLException

left to substring translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqllength

    public static void sqllength(StringBuilder buf,
                                 List<? extends CharSequence> parsedArgs)
                          throws SQLException

length translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqllocate

    public static void sqllocate(StringBuilder buf,
                                 List<? extends CharSequence> parsedArgs)
                          throws SQLException

locate translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlltrim

    public static void sqlltrim(StringBuilder buf,
                                List<? extends CharSequence> parsedArgs)
                         throws SQLException

ltrim translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlright

    public static void sqlright(StringBuilder buf,
                                List<? extends CharSequence> parsedArgs)
                         throws SQLException

right to substring translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlrtrim

    public static void sqlrtrim(StringBuilder buf,
                                List<? extends CharSequence> parsedArgs)
                         throws SQLException

rtrim translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlspace

    public static void sqlspace(StringBuilder buf,
                                List<? extends CharSequence> parsedArgs)
                         throws SQLException

space translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlsubstring

    public static void sqlsubstring(StringBuilder buf,
                                    List<? extends CharSequence> parsedArgs)
                             throws SQLException

substring to substr translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlucase

    public static void sqlucase(StringBuilder buf,
                                List<? extends CharSequence> parsedArgs)
                         throws SQLException

ucase to upper translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlcurdate

    public static void sqlcurdate(StringBuilder buf,
                                  List<? extends CharSequence> parsedArgs)
                           throws SQLException

curdate to current_date translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlcurtime

    public static void sqlcurtime(StringBuilder buf,
                                  List<? extends CharSequence> parsedArgs)
                           throws SQLException

curtime to current_time translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqldayname

    public static void sqldayname(StringBuilder buf,
                                  List<? extends CharSequence> parsedArgs)
                           throws SQLException

dayname translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - 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 into
  `parsedArgs` - 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 Redshift function since we expect values from 1 to 7

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - 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 into
  `parsedArgs` - 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 into
  `parsedArgs` - 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 into
  `parsedArgs` - 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 into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlmonthname

    public static void sqlmonthname(StringBuilder buf,
                                    List<? extends CharSequence> parsedArgs)
                             throws SQLException

monthname translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - 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 into
  `parsedArgs` - 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 into
  `parsedArgs` - 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 into
  `parsedArgs` - 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 into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqltimestampadd

    public static void sqltimestampadd(StringBuilder buf,
                                       List<? extends CharSequence> parsedArgs)
                                throws SQLException

time stamp add

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqltimestampdiff

    public static void sqltimestampdiff(StringBuilder buf,
                                        List<? extends CharSequence> parsedArgs)
                                 throws SQLException

time stamp diff

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqldatabase

    public static void sqldatabase(StringBuilder buf,
                                   List<? extends CharSequence> parsedArgs)
                            throws SQLException

database translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqlifnull

    public static void sqlifnull(StringBuilder buf,
                                 List<? extends CharSequence> parsedArgs)
                          throws SQLException

ifnull translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### sqluser

    public static void sqluser(StringBuilder buf,
                               List<? extends CharSequence> parsedArgs)
                        throws SQLException

user translation

Parameters:
  `buf` - The buffer to append into
  `parsedArgs` - arguments
Throws:
  `SQLException` - if something wrong happens

#### appendCall

    public static void appendCall(StringBuilder sb,
                                  String begin,
                                  String separator,
                                  String end,
                                  List<? extends CharSequence> args)

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

Parameters:
  `sb` - destination StringBuilder
  `begin` - begin string
  `separator` - separator string
  `end` - end string
  `args` - arguments