Array Lower
Definition
The arrayLower
method allows you to add the ARRAY_LOWER
function to the query. The ARRAY_LOWER
function is used returns lower bound of the requested array dimension.
Available methods
arrayLower(KColumn kColumnArray, int n)
: Receives aKColumn
orKTableColumn
and a int value which will be supplied to theARRAY_LOWER
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(
arrayLower(arrayAgg(APP_USER.EMAIL), 1),
APP_USER.CREATED_AT.cast(date())
)
.from(APP_USER)
.groupBy(APP_USER.CREATED_AT.cast(date()))
.multiple();
SQL generated:
SELECT
ARRAY_LOWER(ARRAY_AGG(au.email), 1),
CAST(au.created_at AS DATE)
FROM app_user au
GROUP BY CAST(au.created_at AS DATE)
Parameters:
- None