fix(database): convert backtick identifiers to double quotes for postgres#2093
Open
laylatichy wants to merge 2 commits intotempestphp:3.xfrom
Open
fix(database): convert backtick identifiers to double quotes for postgres#2093laylatichy wants to merge 2 commits intotempestphp:3.xfrom
laylatichy wants to merge 2 commits intotempestphp:3.xfrom
Conversation
…greSQL Query::compile() stripped backtick quoting entirely for PostgreSQL, leaving identifiers unquoted. This breaks for reserved words like order, user, group, and type. Now converts backticks to double quotes, which is the correct PostgreSQL identifier quoting.
Benchmark ResultsComparison of Open to see the benchmark resultsNo benchmark changes above ±5%. Generated by phpbench against commit cc40648 |
9b1083f to
ff85d3d
Compare
5e6013d to
3147040
Compare
…ements Add DatabaseDialect::quoteIdentifier() that returns backticks for MySQL/SQLite and double quotes for PostgreSQL. Update all QueryStatement compile() methods to use it instead of hardcoded backticks. Query::compile() safety net remains for __toString() paths that lack dialect context. include UpdateStatement in quoteIdentifier refactor
3147040 to
cc40648
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix for #2088