Skip to content

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