Metakit / @doeixd/metakit

Bool

namespace · packages/metakit/src/ops/bool.ts:7

export * as Bool from './ops/bool.js'

Boolean primitive operators (bool.and, bool.or, bool.not), three-valued the way SQL's are: false AND null is false, true AND null is null. A refused operand refuses either, whatever the other is: false AND x is refused where x is, as a database refuses the statement.

In the guides

Members

Bool.and

function · packages/metakit/src/ops/bool.ts:46

function and<
  L extends ExprInput<never, boolean | null>,
  R extends ExprInput<never, boolean | null>,
>(
  left: L,
  right: R,
): Expr<EnvOfInput<L> & EnvOfInput<R>, boolean | NullOf<L> | NullOf<R>>

Conjunction of two boolean expressions.

Bool.andOp

const · packages/metakit/src/ops/bool.ts:23

const andOp = { id, returns, nulls, evaluate }

Bool.not

function · packages/metakit/src/ops/bool.ts:65

function not<X extends ExprInput<never, boolean | null>>(
  value: X,
): Expr<EnvOfInput<X>, boolean | NullOf<X>>

Logical negation of a boolean expression; the negation of null is null.

Bool.notOp

const · packages/metakit/src/ops/bool.ts:37

const notOp = { id, returns, nulls, evaluate }

Bool.or

function · packages/metakit/src/ops/bool.ts:56

function or<
  L extends ExprInput<never, boolean | null>,
  R extends ExprInput<never, boolean | null>,
>(
  left: L,
  right: R,
): Expr<EnvOfInput<L> & EnvOfInput<R>, boolean | NullOf<L> | NullOf<R>>

Disjunction of two boolean expressions.

Bool.orOp

const · packages/metakit/src/ops/bool.ts:30

const orOp = { id, returns, nulls, evaluate }