fix: failed reads keep the database error, reads that write are refused - #2634
Merged
Merged
Conversation
- from_pgsql_*() and from_dbal_*() rethrow the database's own error; a refused probe keeps it as the cause - from_pgsql_*() refuse anything but one read-only SELECT or VALUES before any query - pgsql extractors parse once per read and page with one SQL string and new parameters - sql_to_*_query() helpers and pagination modifiers refuse queries that write - a failed from_pgsql_cursor() read rolls back its own transaction - from_pgsql_limit_offset() requires the query's own ORDER BY
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 1.x #2634 +/- ##
============================================
+ Coverage 84.42% 84.55% +0.13%
- Complexity 29990 30064 +74
============================================
Files 2005 2007 +2
Lines 86850 87047 +197
============================================
+ Hits 73320 73600 +280
+ Misses 13530 13447 -83 🚀 New features to boost your workflow:
|
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.
Resolves: #xxx
Change Log
Added
flow-php/postgresql- Traverser hands the whole query to handlers registered for ParseResultflow-php/postgresql- Statements::assertReadOnlySelect() and SelectStatement::hasDataModifyingCte() / hasOrderBy()flow-php/postgresql- pagination configs accept param() placeholdersflow-php/postgresql- declare_cursor() accepts a parsed queryflow-php/etl- SchemaNotDerivableException::probeRefused() keeps the database error as its causeFixed
flow-php/etl-adapter-postgresql- a failed read throws the database's own errorflow-php/etl-adapter-postgresql- from_pgsql_*() refuse a query that writes before any round tripflow-php/etl-adapter-postgresql- a failed from_pgsql_cursor() read rolls back its own transactionflow-php/etl-adapter-postgresql- from_pgsql_limit_offset() requires the query's own ORDER BYflow-php/etl-adapter-doctrine- a refused schema probe keeps the driver error as its causeflow-php/postgresql- sql_to_*_query() helpers and pagination modifiers refuse a query that writesflow-php/postgresql- declare_cursor() over a non-SELECT no longer crashes the processflow-php/postgresql- SelectStatement::hasIntoClause() sees SELECT ... INTO in a set operationflow-php/postgresql- describe() errors point at the caller's SQLChanged
flow-php/etl-adapter-postgresql- extractors parse the query once per read and page with one SQL stringRemoved
Deprecated
Security