Skip to content

fix: Use ~~ as match operator #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2025
Merged

fix: Use ~~ as match operator #96

merged 1 commit into from
Mar 20, 2025

Conversation

tobyhede
Copy link
Contributor

Using ~~ and ~~* as match operators enable LIKE and ILIKE at no extra charge.

@tobyhede tobyhede requested a review from CDThomas March 20, 2025 03:53
Copy link
Contributor

@freshtonic freshtonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you might have missed out a word on a code comment - see my comment.

Otherwise all good!

You'll need to bump the EQL release again once merged - and update proxy and possibly protectjs too.

--

DROP OPERATOR IF EXISTS @> (cs_encrypted_v1, cs_encrypted_v1);
DROP FUNCTION IF EXISTS cs_encrypted_contains_v1(a cs_encrypted_v1, b cs_encrypted_v1);
-- The operator ~~ is equivalent to LIKE, and ~~*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is ~~* equivalent to ILIKE? If so you've accidentally a word

@tobyhede tobyhede force-pushed the match-using-like-operators branch from e78f712 to 2bfb348 Compare March 20, 2025 03:58
Copy link
Contributor

@CDThomas CDThomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, glad that using ~~/~~* allows us to skip mapping for LIKE/ILIKE support.

@tobyhede tobyhede merged commit 4b0d27c into main Mar 20, 2025
4 checks passed
@tobyhede tobyhede deleted the match-using-like-operators branch March 20, 2025 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants