This documentation describes unreleased changes on the main branch.

NullableBoolField

Class. It extends BoolField.

use Saij\WpAppFramework\Query\Field\NullableBoolField;

A nullable bool column of a table (?bool). notEquals() and notIn() also match rows whose column is null, like null !== $value in PHP.

Constructor

new NullableBoolField(string $class, string $field)
ParameterTypeDefaultDescription
classclass-stringrequiredThe class the field belongs to: a meta class (#[PostMeta]) or row class (#[Table]).
fieldstringrequiredThe name of the constructor parameter.

Methods

equals()

equals(bool $value): Condition

Matches values equal to $value.

ParameterTypeDefaultDescription
valueboolrequiredTrue or false.

Returns Condition

getClass()

getClass(): string

The class the field belongs to.

Returns class-string

getField()

getField(): string

The name of the field: the name of the constructor parameter.

Returns string

isNotNull()

isNotNull(): Condition

Rows whose column is not null.

Returns Condition

isNull()

isNull(): Condition

Rows whose column is null.

Returns Condition