pub trait BooleanLike: DataType { }Expand description
SQL types that can be used as a condition: in WHERE, HAVING, join
ON, CASE WHEN, and with AND, OR and NOT.
| Dialect | Markers |
|---|---|
| SQLite | Integer (SQLite has no boolean type; 0 is false) |
| PostgreSQL | Boolean |
| MySQL | Boolean |
Conjunction, the type of a tuple of conditions, is also boolean-like.
Comparisons such as eq produce a boolean-like type, so they can be used
as conditions directly.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".