Fix PostgreSQL test errors: union operations and JSON field access#590
Draft
Fix PostgreSQL test errors: union operations and JSON field access#590
Conversation
Co-authored-by: FCO <99834+FCO@users.noreply.github.com>
- Remove outdated skip for MINUS operations in t/14-union.rakutest (PostgreSQL already supports EXCEPT)
- Fix JSON field access by using proper PostgreSQL JSONB path syntax: #{key} instead of #'key'
- Fix JSON parameter binding by using native data structures instead of stringified JSON
- Change PostgreSQL driver to stringify-json = False for proper JSONB handling
Co-authored-by: FCO <99834+FCO@users.noreply.github.com>
Co-authored-by: FCO <99834+FCO@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix test errors
Fix PostgreSQL test errors: union operations and JSON field access
Sep 9, 2025
Owner
|
@copilot the tests are still failing |
Co-authored-by: FCO <99834+FCO@users.noreply.github.com>
Author
Fixed the PostgreSQL JSONB path syntax error. The issue was that I wasn't properly escaping the closing brace in the path generation, which was causing malformed SQL like Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
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.
This PR fixes several PostgreSQL-related test failures that were preventing proper testing and usage of Red ORM with PostgreSQL databases.
Issues Fixed
1. Union/Minus Operations (t/14-union.rakutest)
2. JSON Field Access (t/37-json.rakutest)
stringify-json = Falsefor proper JSONB handling'{key}'instead of incomplete'{key':!pretty)Technical Changes
'\{$path\}'syntax to generate proper'{key}'pathsstringify-jsonfromTruetoFalsefor native JSONB storageTesting Status
The latest fix addresses a syntax error where the closing brace wasn't properly escaped in the JSONB path generation, which would have caused malformed SQL queries.
Fixes #589.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.