Skip to content

Portable text search: case-insensitive contains and LIKE escaping #83

Open

Description

@artile

Signal

We want portable helpers for text match: contains, startsWith, endsWith and ilike. They escape % and _ in the value, and they work the same on every dialect.

Why (MyRemotely)

  • 60 contains: and 23 mode: insensitive filters. Examples: search by tenant name, address and phone.
  • The dialects differ. Postgres has ILIKE. SQLite LIKE ignores case only for ASCII. MySQL depends on the collation. The helper must document what "insensitive" means on each one, or use lower() on both sides.

Part of #52: the CAFE-stack roadmap signal from MyRemotely. This shows the direction we want, and it is not a demand. We can send a PR if you accept the idea.

Activity

  1. Makisuo commented on Oct 25, 2026

    @Makisuo
    Contributor

    The escaping half landed in #119: SQLite LIKE now writes ESCAPE '\', so \%, \_ and \\ escape the same way on every dialect, and docs/sqlite.md states that SQLite's LIKE ignores ASCII case. Core cases like-escape and like-case pin both on every dialect. The portable contains/startsWith/endsWith helpers are in review in #114.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions