jOOQ by default always creates bind variables.

I hope this helps

Am Freitag, 14. Juni 2019 schrieb 'Maverick Skywalker' via jOOQ User Group <
jooq-user@googlegroups.com>:

> Thanks Lukas that helped a lot. :)
>
> Does provide JOOQ also a method to prevent SQL injections at this point?
> "record.get(x).toString()"
>
> public static Condition likeCondition(Record record) {
>     Condition condition = DSL.noCondition();
>     Field<?>[] fields = record.fields();
>
>     for(int x = 0; x < fields.length; x++) {
>         if(record.get(x) != null) {
>             condition = condition.and(fields[x].like(
> record.get(x).toString()+"%"));
>         }
>     }
>
>     return condition;
> }
>
> Best regards Maverick
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jooq-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jooq-user/e480c662-123f-4d5d-b346-3fd1379f6487%40googlegroups.com
> <https://groups.google.com/d/msgid/jooq-user/e480c662-123f-4d5d-b346-3fd1379f6487%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAB4ELO4Dn3Quxz1NmowjtzWFnK7atNJ6je1utJDismXYAbVoDQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to