Skip to content

AsBool

relationalai.semantics.frontend.base
AsBool(item: Variable | Not)

Represents a boolean-typed wrapper around a DSL expression.

AsBool wraps another DSL value and forces its type to be Boolean, so it can be selected as a column or composed like other values.

At execution time, the result is True when the wrapped expression can succeed for the current bindings, and False otherwise.

Notes

Most users should not instantiate this class directly. Prefer Variable.as_bool or selecting a boolean expression directly.

Inheritance Hierarchy

AsBoolVariableDSLBase

Returned By

 semantics > frontend > base
└──  Variable
    └──  as_bool