Skip to content

fix: Add database/schema for update and delete queries#250

Merged
Maxteabag merged 5 commits into
Maxteabag:mainfrom
eibx:feature/update-delete-query-qualified-name
Jun 3, 2026
Merged

fix: Add database/schema for update and delete queries#250
Maxteabag merged 5 commits into
Maxteabag:mainfrom
eibx:feature/update-delete-query-qualified-name

Conversation

@eibx

@eibx eibx commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

When you use update and delete from the result panel - it doesn't include database/schema. This PR should add them.

I've tried to not include them if they are not needed.

  • Database qualifier is only added if it's provided and when self.supports_cross_database_queries is true
  • Schema qualifier is only added if it's provided, if it's different from the self.default_schema and if database qualifier hasn't already been added. ([db].[users] doesn't work, has to be [db].[dbo].[users])

Locally I've also updated the build_select_query on all providers to use qualified_name. It still needs some testing, but it simplifies the functions a lot. Would you like a PR with that as well?

eibx and others added 5 commits June 2, 2026 22:00
Drives the real action_delete_row / action_edit_cell against a SQL Server
with two databases. With the old bare-table-name query the statements hit
the connection's current database instead of the table's own; this asserts
the qualified name targets the correct database. Skips when no server.
@Maxteabag

Copy link
Copy Markdown
Owner

Thanks for the fix!

@Maxteabag

Copy link
Copy Markdown
Owner

I don't think we need the "build_select_query" refactoring.

@Maxteabag Maxteabag merged commit 1f97577 into Maxteabag:main Jun 3, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants