Skip to content
VibORM
Esc
navigateopen⌘Jpreview
On this page

Boolean Filters

Filter operators for boolean scalars

Operators

Operator Description
equals Exact match
not Negation
// Direct value (shorthand for equals)
where: { active: true }

// Negation
where: { active: { not: true } }   // Same as active: false

Both operators work the same on every scalar type — see Filtering.

Nullable Booleans

For nullable boolean scalars:

// Only true
where: { verified: true }

// Only false (not null)
where: { verified: false }

// Only null
where: { verified: null }

// Not null (true or false)
where: { verified: { not: null } }

Combined Conditions

// Active and not deleted
where: {
  active: true,
  deleted: false,
}

// Published or featured
where: {
  OR: [
    { published: true },
    { featured: true },
  ],
}

For the soft-delete pattern (a deleted boolean instead of removing rows), see delete.

Was this page helpful?