Row level security - VisitListener alternative

20 views
Skip to first unread message

P R

unread,
Mar 31, 2020, 7:45:08 PM3/31/20
to jOOQ User Group
I've a piece of java code based on this article where in, at runtime, we intercept all select, update and delete queries and add a where clause (i.e. customerId = '...'). Since the org.jooq.Clause has been deprecated, what is the recommended way to achieve the equivalent.

Thanks.

Lukas Eder

unread,
Apr 1, 2020, 4:20:20 AM4/1/20
to jOOQ User Group
Hi there,

Thanks for your question. The org.jooq.Clause has been deprecated because it was not designed well enough to provide predictable introspections into how jOOQ's QueryParts are composed. In fact, they are very arbitrary and there is no guarantee, nor documentation around whether a "clause event" happens before or after a certain keyword, or whatever. Deprecating this is an indication of:

- The fact that the clause is not a very reliable means of identifying the location within the QueryPart tree
- The fact that we will replace this functionality eventually
- The fact that we do not add any new clauses for new statements, e.g. for DDL statements

This doesn't mean you cannot use it for the time being, knowing that we'll provide a replacement for the entire VisitListener functionality as we'll provide a new query object model as public API, with pattern matching capabilities, which will be much better suited to the task of custom SQL transformations. Until then, there are no specific recommendations with respect to replacements, as there are no such replacements yet.

I hope this helps,
Lukas

On Wed, Apr 1, 2020 at 1:45 AM P R <rathip...@gmail.com> wrote:
I've a piece of java code based on this article where in, at runtime, we intercept all select, update and delete queries and add a where clause (i.e. customerId = '...'). Since the org.jooq.Clause has been deprecated, what is the recommended way to achieve the equivalent.

Thanks.

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/e8adc649-9328-4e68-a750-9fbd4f6b09e1%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages