Problem
like and ilike currently use the general comparison-value bounds, so unrelated operands compile:
Metric::attempts.like(1_i32);
Event::id.ilike(uuid::Uuid::nil());
PostgreSQL rejects the generated operators at execution time.
Expected behavior
- Restrict
LIKE sources and patterns to supported text and BYTEA operands.
- Restrict
ILIKE to text operands; PostgreSQL does not provide BYTEA ILIKE.
- Support required/nullable source and pattern combinations with the correct optional boolean output.
- Apply the same restrictions to columns and computed expressions.
- Add compile-fail coverage for numeric, UUID, date/time, and other unrelated types.
- Preserve
&str convenience for text patterns.
Use separate marker traits if necessary because LIKE and ILIKE do not have the same PostgreSQL operand set.
Problem
likeandilikecurrently use the general comparison-value bounds, so unrelated operands compile:PostgreSQL rejects the generated operators at execution time.
Expected behavior
LIKEsources and patterns to supported text and BYTEA operands.ILIKEto text operands; PostgreSQL does not provide BYTEAILIKE.&strconvenience for text patterns.Use separate marker traits if necessary because
LIKEandILIKEdo not have the same PostgreSQL operand set.