Skip to main content

Update

Definition

The update methods allows you to add the UPDATE clause to the query.

Available methods

1. update(KTable kTable)

  • kTable: is the table which will be added to UPDATE clause.

2. update(KRaw kRaw)

  • kRaw: is a raw content which will be added in the UPDATE clause.

Method hierarchy

The update method can be used right after the following methods or objects:

and the subsequent methods that can be called are:

Example: KTable

Java code:

k
.update(APP_USER)
.set(APP_USER.FIRST_NAME, APP_USER.LAST_NAME)
.execute();

SQL generated:

UPDATE app_user au
SET first_name = au.last_name

Parameters:

  • None

Example: KRaw

Java code:

k
.update(raw("app_user au"))
.set(APP_USER.FIRST_NAME, raw("au.last_name"))
.execute();

SQL generated:

UPDATE app_user au
SET first_name = au.last_name

Parameters:

  • None