Use jOOQ instead of Glom.build_sql*(), to avoid native calls.
authorMurray Cumming <murrayc@murrayc.com>
Sun, 22 Apr 2012 22:30:44 +0000 (00:30 +0200)
committerMurray Cumming <murrayc@murrayc.com>
Tue, 24 Apr 2012 14:04:45 +0000 (16:04 +0200)
commita58edb78174becaa13aaf0aaa48e6d979024ef06
treecb12789745c261d931b4cdeecd1ae9f019bcc5fb
parentfec315469229978e8a2012d95ece6a292dbe3004
Use jOOQ instead of Glom.build_sql*(), to avoid native calls.

* pom.xml: Depend on jooq.
* src/main/java/org/glom/web/server/SqlUtils.java: Reimplement the
methods with jOOQ, based on the C++ implementations in libglom,
with some changes to the logic required by jooQ.
Take a jOOQ Condition rather than a Glom.SqlExpr (GdaSqlExpr) for the
where clause.
* src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java:
* src/main/java/org/glom/web/server/ReportGenerator.java:
* src/main/java/org/glom/web/server/SqlUtils.java:
* src/main/java/org/glom/web/server/database/DetailsDBAccess.java:
* src/main/java/org/glom/web/server/database/ListDBAccess.java:
* src/main/java/org/glom/web/server/database/ListViewDBAccess.java:
* src/main/java/org/glom/web/server/database/RelatedListDBAccess.java:
* src/main/java/org/glom/web/server/database/RelatedListNavigation:
Adapt. In particular, the SqlUtils methods now need to take a Connection,
because jOOQ needs that, though it seems unnecessary.

This is not quite finished. Ideally jOOQ would help us to build
table_name.field_name names, quoting and escaping them properly.
See http://stackoverflow.com/questions/10264001/instantiating-a-jooq-field-by-name
ChangeLog
pom.xml
src/main/java/org/glom/web/client/ui/TableSelectionViewImpl.java
src/main/java/org/glom/web/server/ReportGenerator.java
src/main/java/org/glom/web/server/SqlUtils.java
src/main/java/org/glom/web/server/database/DetailsDBAccess.java
src/main/java/org/glom/web/server/database/ListDBAccess.java
src/main/java/org/glom/web/server/database/ListViewDBAccess.java
src/main/java/org/glom/web/server/database/RelatedListDBAccess.java
src/main/java/org/glom/web/server/database/RelatedListNavigation.java