Skip to content

Sqlite: Fix LIKE BINARY queries #149

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 8 commits into from
Aug 14, 2024
Merged

Conversation

kozer
Copy link
Contributor

@kozer kozer commented Aug 7, 2024

This PR modifies the SQLite database integration plugin ensuring LIKE BINARY queries are supported.

The translator has been updated to utilize the GLOB SQLite function to support the LIKE BINARY clause in Sqlite, ensuring it respects case sensitivity.

Example query

MySQL

SELECT * FROM _tmp_table WHERE name LIKE BINARY 'f%'

SQLite

SELECT * FROM _tmp_table WHERE name GLOB 'f*'

aristath and others added 3 commits July 29, 2024 11:55
Version 2.1.13

---------

Co-authored-by: Jeroen P <jeroenpf@users.noreply.github.com>
Co-authored-by: Rostislav Wolný <1082140+costasovo@users.noreply.github.com>
@kozer kozer marked this pull request as draft August 7, 2024 16:39
@kozer kozer marked this pull request as ready for review August 8, 2024 06:12
@jeroenpf
Copy link
Contributor

@aristath - could you have a look at this PR? The LIKE BINARY queries are used in the wp cli search-replace commands so it would be good to include this fix.

@aristath aristath merged commit 46528e8 into WordPress:develop Aug 14, 2024
8 checks passed
@kozer
Copy link
Contributor Author

kozer commented Aug 14, 2024

@aristath , can we deploy a new version so we can use it in studio? Is it possible?
Thank you very much

@aristath
Copy link
Member

Done.

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