Boolean Type

type bool

A boolean type with possible values of true and false.

EdgeQL has case-insensitive keywords and that includes the boolean literals:

db> 
SELECT (True, true, TRUE);
{(true, true, true)}
db> 
SELECT (False, false, FALSE);
{(false, false, false)}

A boolean value may arise as a result of a logical or comparison operations as well as IN and NOT IN:

db> 
SELECT true AND 2 < 3;
{true}
db> 
SELECT '!' IN {'hello', 'world'};
{false}

It is also possible to cast between bool, str, and json:

db> 
SELECT <json>true;
{'true'}
db> 
SELECT <bool>'True';
{true}

Filter clauses must always evaluate to a boolean:

SELECT User
FILTER .name ILIKE 'alice';

Scalar type SDL, DDL, introspection, and boolean operators.