Skip to content

Deprecate LOCATE() emulation on SQLite #5749

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 1 commit into from
Oct 12, 2022

Conversation

derrabus
Copy link
Member

Q A
Type improvement
Fixed issues Part of #5745

Summary

We currently emulate the LOCATE() function on SQLite in order to provide an implementation for AbstractPlatform::getLocateExpression(). However, SQLite ships a function called INSTR() which does the same except that it does not support offsets.

This PR changes SqlitePlatform::getLocateExpression() to use INSTR() instead. If LOCATE() is used in a SQLite query, a deprecation is triggered.

@derrabus derrabus force-pushed the deprecate/sqlite-locate branch from 01d3c0e to 8afd04d Compare October 11, 2022 20:25
@derrabus derrabus merged commit 6b9a08c into doctrine:3.5.x Oct 12, 2022
@derrabus derrabus deleted the deprecate/sqlite-locate branch October 12, 2022 05:19
@morozov morozov added this to the 3.5.0 milestone Oct 13, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants