every method

Expr<bool?> every(
  1. Expr<bool?> condition(
    1. F
    )
)

Checks that every filtered related row makes condition SQL TRUE.

An empty relationship satisfies this expression. SQL FALSE and SQL NULL both count as failures of the condition. Apply it before take or skip.

Implementation

Expr<bool?> every(Expr<bool?> Function(F) condition) {
  final conditionNode = condition(queryFields).expressionNode;
  return where(
    (_) => Expr.internal(
      UnaryNode('IS NOT TRUE', conditionNode, postfix: true),
      Codecs.boolean,
    ),
  ).none();
}