Repository navigation
fix: enhance upsert functionality for proper sql generation with table alias - #11915
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
commit: |
PR Code Suggestions ✨
|
|||||||||
Code Review by Qodo (Alpha)(Review updated until commit ca5400c)
✅
🐞 Bug |
This comment was marked as resolved.
This comment was marked as resolved.
PR Code Suggestions ✨
|
|||||||||
|
Persistent review updated to latest commit a12b8c0 |
This comment was marked as resolved.
This comment was marked as resolved.
|
@gioboa, could you please review the changes? |
…meter name and refactor test for custom schema
a12b8c0 to
3bd1a3b
Compare
PR Code Suggestions ✨No code suggestions found for the PR. |
|
Persistent review updated to latest commit 3bd1a3b |
PR Code Suggestions ✨No code suggestions found for the PR. |
|
Persistent review updated to latest commit a8a41b4 |
PR Code Suggestions ✨No code suggestions found for the PR. |
|
Persistent review updated to latest commit ca5400c |
Description of change
This pull request addresses the issue with table inheritance when using upsert operations with custom schemas in databases such as PostgreSQL, CockroachDB, and SQL Server. It corrects the wrong column names referenced in the SQL query.
Example:
For the
secondInsertgenerated sql:There is a slight difference in referencing
my_schema.human: in PostgreSQL/CockroachDB, it uses direct column name"my_schema"."human"."type", while in SQL Server, it is used as an alias `"my_schema.human"."type".For SQL Server, the
MERGE INTOclause is used with table alias, whereas for PostgreSQL/CockroachDB, theINSERT INTOclause is utilized without table alias.Pull-Request Checklist
masterbranchFixes #11689tests/**.test.ts)docs/docs/**.md)Fixes #11689