Skip to content
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

query: Add Contains operator #634

Closed
wants to merge 1 commit into from
Closed

query: Add Contains operator #634

wants to merge 1 commit into from

Conversation

metalmatze
Copy link
Member

Adding a |= operator to FrostDB.
It's basically LIKE '%$foo%' in SQL. It'll return true whenever the string contains the substring.

Adding a `|=` operator to FrostDB.
It's basically `LIKE '%$foo%'` in SQL. It'll return true whenever the string contains the substring.
@thorfour
Copy link
Contributor

Do we need this if we could do this with regexp matching?

@metalmatze
Copy link
Member Author

Interesting idea to use the regexp.
We still need this as it uses substring matching rather than full regexp which I assume to be a lot cheaper. We could benchmark this.

@thorfour
Copy link
Contributor

Interesting idea to use the regexp. We still need this as it uses substring matching rather than full regexp which I assume to be a lot cheaper. We could benchmark this.

Instead of regexp matching instead have the regexp operator downgrade itself into a Contains matcher if it detects it's regexp is a substring matcher.

@github-actions github-actions bot added the Stale label Jan 18, 2024
@github-actions github-actions bot closed this Jan 23, 2024
@metalmatze
Copy link
Member Author

I'll start fresh from the regexp angle.

@brancz
Copy link
Member

brancz commented Jan 30, 2024

What Thor said would be a great logical optimizer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants