Skip to main content

Window

Definition

The window method allows you to add the WINDOW clause to the query.

The WINDOW clause allows you to define multiples window definition that can be referenced in OVER clause.

Available methods

1. window(KWindowDefinitionAllowedToWindow... KWindowDefinitionsAllowedToWindow)

  • KWindowDefinitionsAllowedToWindow: are all the window definitions which will be supplied to the WINDOW clause.

Method hierarchy

The window method can be used right after the following methods:

and the subsequent methods that can be called are:

Example

Java code:

final KWindowDefinitionUnnamedPartitioned wdn1 =
wd("the_name")
.partitionBy(APP_USER.ROLE_ID);

k
.select(
APP_USER.FIRST_NAME,
rowNumber().over(wdn1)
)
.from(APP_USER)
.window(wdn1)
.multiple();

SQL generated:

SELECT
au.first_name,
ROW_NUMBER() OVER "the_name"
FROM app_user au
WINDOW "the_name" AS (PARTITION BY au.role_id)

Parameters:

  • None