Skip to main content

comparison_rules

Function comparison_rules 

Source
pub fn comparison_rules(
    left: &BoundExpr,
    right: &BoundExpr,
) -> (Option<Affinity>, Collation)
Expand description

Returns the affinity and collation a comparison between two operands uses.

SQLite’s rule, in order: if either side has a column affinity the comparison applies it, with the left side winning. The collation is an explicit one on the left operand, then an explicit one on the right, then the left operand’s implicit one, then the right’s, and otherwise BINARY. “On an operand” includes anywhere inside it: see BoundExpr::explicit_collation.

@param left - the comparison’s left operand @param right - the comparison’s right operand