Skip to main content

Null methods

Definition

The Null methods allow you to add the IS NULL operator to the query.

The methods available are:

Normal method nameSQL to generate
isNullleftOp IS NULL
isNotNullleftOp IS NOT NULL
info

For all cases, the object that calls Null methods will be placed as the operand on the left side of the IS NULL operator.

1. isNull

SQL to generate
leftOperand IS NULL

This method takes no parameters.

Example: isNull()

Java code:

k
.select(APP_USER.ID)
.from(APP_USER)
.where(APP_USER.EMAIL.isNull())
.multiple();

SQL generated:

SELECT au.id
FROM app_user au
WHERE au.email IS NULL

Parameters:

  • None

1. isNotNull

SQL to generate
leftOperand IS NOT NULL

This method takes no parameters.

Example: isNotNull()

Java code:

k
.select(APP_USER.ID)
.from(APP_USER)
.where(APP_USER.EMAIL.isNotNull())
.multiple();

SQL generated:

SELECT au.id
FROM app_user au
WHERE au.email IS NOT NULL

Parameters:

  • None