Skip to content

feat: stringtheory.like(haystack text, search text) -> boolean #4

@wuputah

Description

@wuputah

This is a possible proposal to implement:

stringtheory.like(haystack text, search text) -> boolean

The implementation would only optimize only if search text is either: %foo% (substring), %foo (suffix), or foo% (prefix) search. Otherwise the implementation would fall back to the Postgres built-in LIKE search automatically.

Possible gotchas:

  • %_foo% would not be supported, since _ means "matches any 1 character"
  • %\_foo% is supported, since the backslash escapes the _.

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