To enable data isolation (and partitioning in future), our database has a customerId field in majority of the tables. So the expectation is that vast majority of the queries will have a condition like "customerId=..." and appropriate joins to the Customer table. But it is easy to make a mistake and forget to do this. Plus having each and every query in the code do this is introduces a lot of bloat given the joins involved. And hence the thinking is to have all query executions routed through a set of common API that wraps the underlying execution. It is in these common APIs, the query would be inspected prior to execution and accordingly tweaked for compliance.
E.g. Let's say I'm given a SelectQuery. I would look at the tables involved and accordingly add condition "someTable.customerId=..." to the query. Similarly one should be able to do this for Update or Delete queries. Now the question. With jOOQ, we can build queries. But after we build a query how do we get the constituent parts to enable the above? If this is not possible, any alternative suggestions other than trying to dissect the string representation of the query. 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/3d2456e3-4f8e-4af4-bb38-f86db78bc6bf%40googlegroups.com.
