We are building and easy to use browser page for our business users for making queries to Teradata for extracting records. The list of columns that can be used in conditions and select lists is limited to about 30 columns in a few tables. The users should be able to use and / or -logic.
For persisting these queries my idea was that we would serialize a org.jooq.SimpleSelectQuery or org.jooq.SelectQuery as XML into Oracle. When the user wants to view or alter the query through the browser page we would need to open up the conditions inside the JOOQ object. We started with Squiggle (http://code.google.com/p/squiggle-sql/) which allows this - but then found JOOQ. I had tried with this QueryPartInternal qi = q.internalAPI(QueryPartInternal.class); and this (we would recreate the UI objects by 'rendering' the query) <my own class> implements RenderContext but did not get much further. We can of course store the UI selection steps in our own objects and recreate the JOOQ query every time the query is actually executed. Just wanted to know which would be the way to go. Thank you Olli On 8 October 2011 21:36, Lukas Eder <[email protected]> wrote: > Hello Olli, > > As of now, jOOQ does not give you access to QueryParts through the > public API. You can access them using the internal API, but I doubt > that this is what you need. What exactly is your use case? > > Cheers > Lukas > > 2011/10/8 Olli Pöyry <[email protected]>: > > Given an existing SimpleSelectQuery object does JOOQ allow me to > > iterate through its criteria elements? > > > > Something similar as interface FieldProvider has getFields for getting > > the SELECT's columns, but interface ConditionProvider only has methods > > for adding more criterias and not asking about existing ones. > > > > Thank you > > > > Olli Pöyry, Helsinki, Finland > > >
