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

Fix GlobPrefix. #220

Merged
merged 2 commits into from
Jan 28, 2025
Merged

Fix GlobPrefix. #220

merged 2 commits into from
Jan 28, 2025

Conversation

ncruces
Copy link
Owner

@ncruces ncruces commented Jan 28, 2025

Due to a misunderstanding from my part, GlobPrefix would happily return a literal prefix that must start any match, but would not take care to anchor that match at the start of the string, which made it unsuitable to take advantage of the LIKE optimization, and just wrong.

Unfortunately package regexp does not offer a suitable API for this; had to use syntax/regexp instead.
Significant fuzzing went into validating the solution.

This is a breaking API change.

@ncruces ncruces marked this pull request as ready for review January 28, 2025 17:54
@ncruces ncruces merged commit b2f7ab8 into main Jan 28, 2025
2 checks passed
@ncruces ncruces deleted the refix branch January 28, 2025 17:54
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.

1 participant