Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query hints for update queries #4460

Closed
bari12 opened this issue Mar 19, 2021 · 1 comment · Fixed by #4749
Closed

Query hints for update queries #4460

bari12 opened this issue Mar 19, 2021 · 1 comment · Fixed by #4749
Assignees
Milestone

Comments

@bari12
Copy link
Member

bari12 commented Mar 19, 2021

Motivation

For UPDATE queries on oracle the querie hints are missing.

Modification

This might be related to the fact that there are two different ways in sqlalchemy to generate hints:

  • with_hint which is generally used by us, but according to the documentation should only work for SELECT queries.
  • prefix_with whcih can be used for all queries.

Change UPDATES to prefix_with.

@bziemons
Copy link
Member

bziemons commented Aug 4, 2021

I think the culprit lies here: https://docs.sqlalchemy.org/en/14/core/dml.html?highlight=with_hint#sqlalchemy.sql.expression.UpdateBase.with_hint

While with_hint is a well-defined method for any non-select queries, it seems to be a no-op except for MSSQL.

bari12 added a commit that referenced this issue Aug 11, 2021
Database: Change with_hint to prefix_with in update and delete. Closes #4460
@bari12 bari12 added this to the 1.26.2 milestone Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants