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

feat: Add query.setHint() to support sql hint as inline comment in select queries #3365

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

rbygrave
Copy link
Member

This is for ORM queries only.

An ORM query like:

    new QCustomer()
      .setHint("FirstRows")
      .select(QCustomer.Alias.id, QCustomer.Alias.name)
      .findList();

Produces SQL that includes the hint as an inline comment like:

  select /*+ FirstRows */ t0.id, t0.name
  from customer t0

…lect queries

This is for ORM queries only.

An ORM query like:

    new QCustomer()
      .setHint("FirstRows")
      .select(QCustomer.Alias.id, QCustomer.Alias.name)
      .findList();

Produces SQL that includes the hint as an inline comment like:

  select /*+ FirstRows */ t0.id, t0.name
  from customer t0
@rbygrave rbygrave self-assigned this Mar 19, 2024
@rbygrave rbygrave added this to the 14.0.2 milestone Mar 20, 2024
@rbygrave rbygrave merged commit 540ceab into master Mar 20, 2024
1 check passed
@rbygrave rbygrave deleted the feature/sql-hint branch March 20, 2024 08:48
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.

1 participant