| Add query predicate hooks for Active Record types (#58135)
* Add query predicate hooks for Active Record attribute types
Let attribute types customize how attributes and values render in hash
`where` predicates, for cases where read-side SQL differs from what
`cast`/`serialize` produce (e.g. a UUID stored as binary(16) comparing
as `id = UUID_TO_BIN(?)`).
Types opt in with `transforms_query_predicates?` and override
`query_attribute` and/or `query_value`. PredicateBuilder routes
equality, array (IN), and range (BETWEEN) predicates through these
hooks; existing types get no-op defaults and are unaffected.
* Address comments and add CHANGELOG entry
---------
Co-authored-by: Kir Shatrov
Co-authored-by: Rafael Mendonça França |