A boolean (bool) is a primitive type that can be either true or false.
Many SurrealDB operators and functions return booleans.
Boolean values can be written in anycase.
Booleans in WHERE clauses
When performing a query on the database, accessing a record's ID directly or using a record range allows performance to be significantly sped up by avoiding the table scan which is used when a WHERE clause is included.
However, if a WHERE clause is unavoidable, performance can still be improved by simplifying the portion after the clause as much as possible. As a boolean is the simplest possible datatype, having a boolean field that can be used in a WHERE clause can significantly improve performance compared to a more complex operation.
Boolean values vs. truthy values
All SurrealQL values are either truthy or not. While seemingly similar to booleans in that true is a truthy value and false is not, the truthiness of a value extends to all value types and is based on the existence of a concrete value as opposed to empty values, NONE, NULL, and so on. For more information and examples, see this page.