Quote Ident
Definition
The quoteIdent
method allows you to add the QUOTE_IDENT
function to the query. The QUOTE_IDENT
function return the given string suitably quoted to be used as an identifier in an SQL statement string.
There are 2 ways to call this method:
1. Calling from a KColumn
or a KTableColumn
The only one method available to use this functionality calling from a KColumn
or a KTableColumn
is:
quoteIdent()
: It does not receive any parameters. TheKColumn
orKTableColumn
that invokes the method will be the one supplied to theQUOTE_IDENT
function.
Example
Java code:
k
.select(
APP_USER.EMAIL.quoteIdent()
)
.from(APP_USER)
.multiple();
SQL generated:
SELECT
QUOTE_IDENT(au.email)
FROM app_user au
Parameters:
- None
2. Calling from the KFunction
class
The only one method available to use this functionality calling from the KFunction
class are:
quoteIdent(KColumn kColumn)
: Receives aKColumn
or aKTableColumn
which will be supplied to theQUOTE_IDENT
function.
To use this way, you need to import the static functions as follows:
import static com.myzlab.k.KFunction.*;
Example
Java code:
k
.select(
quoteIdent(APP_USER.EMAIL)
)
.from(APP_USER)
.multiple();
SQL generated:
SELECT
QUOTE_IDENT(au.email)
FROM app_user au
Parameters:
- None