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 alias insertion #181

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Fix alias insertion #181

merged 1 commit into from
Jan 14, 2025

Conversation

glenvt18
Copy link
Contributor

SQLite LIKE operator is case-insensitive. Hence the replacement must be case-insensitive too. If it is not, the keyword found by LIKE might not be replaced and will be found again and again. That will cause unlimited growth of sql_results.

Example:
https://en.cppreference.com/w/cpp/memory/allocator and Allocator template argument

Another option would be using GLOB instead of LIKE for case-sensitive search. Whether it is better or not and search pattern selection is out of scope of this commit.

SQLite LIKE operator is case-insensitive. Hence the replacement must be case-insensitive too. If it is not, the keyword found by LIKE might not be replaced and will be found again and again. That will cause unlimited growth of sql_results.

Example:
https://en.cppreference.com/w/cpp/memory/allocator
and Allocator  template argument

Another option would be using GLOB instead of LIKE for case-sensitive search. Whether it is better or not and search pattern selection is out of scope of this commit.
@aitjcize
Copy link
Owner

Thanks for the fix!

@aitjcize aitjcize merged commit 6109041 into aitjcize:master Jan 14, 2025
1 check passed
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.

2 participants