query.orNull() function

Matches a value, or no value at all.

Signature:

export function orNull(value: string | string[]): Partial<FindOptions>;

Parameters

Parameter

Type

Description

value

string | string[]

Value, or values, to accept alongside null.

Returns:

Partial<FindOptions>

A where fragment for one column.

Remarks

For the filter that means "these, and the rows where it is not set": the result is an OR over null and what you pass. Without it a null in a where clause compares rather than tests, and matches nothing.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.