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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jooq-user/e480c662-123f-4d5d-b346-3fd1379f6487%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.