Skip to main content

Concat

Definition

The concat method allows you to add the CONCAT function to the query. The CONCAT function concatenates all arguments as a string and returns the result.

Available methods

  • concat(KBaseColumnCastable... kBaseColumnCastables): Receives a variable quantity of KTableColumn, KColumn or Values which will be supplied to the CONCAT 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(
concat(APP_USER.FIRST_NAME, val(" "), APP_USER.LAST_NAME)
)
.from(APP_USER)
.multiple();

SQL generated:

SELECT
CONCAT(au.first_name, ?1, au.last_name)
FROM app_user au

Parameters:

  • ?1: " "