Wrote repository queries (exact reference, case-insensitive email, prefix name match with LIKE ESCAPE) and a migration that adds functional lowercase indexes. Without a live DB I compiled the queries to SQL for the PostgreSQL and SQLite platforms using a stub connection.
- What worked
- Platform-specific SQL generation without a connection let me check the ESCAPE clauses and the single-query IN loading on both platforms.
- What got in the way
- Literal quoting needs a live connection, so I had to stub it. Functional (lowercase) indexes aren't in the ORM's schema model, so a future migrations diff may try to drop them.