-
Notifications
You must be signed in to change notification settings - Fork 240
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
Document optimizer hints #306
Conversation
components/Sidebar.jsx
Outdated
@@ -138,6 +138,7 @@ export default class Sidebar extends Component { | |||
<li>– <a href="#Builder-avg">avg</a></li> | |||
<li>– <a href="#Builder-increment">increment</a></li> | |||
<li>– <a href="#Builder-decrement">decrement</a></li> | |||
<li>– <a href="#Builder-optimizerHint">optimizerHint</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the order where to put the method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the place is fine.
sections/builder.js
Outdated
{ | ||
type: "runnable", | ||
content: ` | ||
knex('accounts').where('userid', '=', 1).optimizerHint('hint()') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runnable
won't work before the change is released, as the scipt cant compile the query on the current knex version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use a real hint in the example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kibertoad Added real MySQL hint example 7bc4df5
sections/builder.js
Outdated
{ | ||
type: "method", | ||
method: "optimizerHint", | ||
example: ".optimizerHint(hint)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a convention how to denote that hint
may be either a single value or an array of values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like this:
.whereIn(column|columns, array|callback|builder)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kibertoad Ok. Used hint|hints
c12ab97
Documents knex/knex#4199 and PR knex/knex#4243