-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Manual section about like should document example of concatenating "%" to a bind value #10651
Comments
The reason for extending this page with an example for SQL templating is because this is the page that turns up if you google "JOOQ + like". A simple example could be enough here and you could drop hinting at the many things that can generally go wrong to avoid adding to much noise to this section. |
Thanks for your feedback, @steinard. I understand that this particular combination of features ( But if we document this here on the page that you've reached through google, someone else might not find this particular piece of documentation, and they would again not profit from the improvement (e.g. they may be looking for While I agree that hinting at concatenating Two examples:
We do get a lot of documentation improvement suggestions like this. They tend to suggest a fix the immediate problem for 1 person. But I had much rather invest a bit more time and fix the general problem for everyone. We cannot put a disclaimer about plain SQL templating, JPA, etc. etc. on every single page that can be found on google. However, we can identify more high level use-cases (e.g. people working with code generation vs people working with plain SQL templating), and adapt the entire manual for them. I have created another issue for this: #10667 Does this make sense? |
Certainly, it would be great to have this option in the documentation to see all the features in the context of SQL templating. |
The section will be included with the next build of the manual |
Great, thanks! |
To help prevent API misuse and possibly even SQL injection if someone tries to use
LIKE
in a plain SQL template, we should add a short section showing an example of concatenating"%"
to a bind value for use in aLIKE
predicate:https://www.jooq.org/doc/latest/manual/sql-building/conditional-expressions/like-predicate/
In addition to:
Show also:
The text was updated successfully, but these errors were encountered: