Format json from Result record contains only column names.

24 views
Skip to first unread message

ankurkumar

unread,
Mar 11, 2015, 2:32:44 AM3/11/15
to jooq...@googlegroups.com
 
Hi,


Result<Record>  records = this.databaseClient.getContext().select()
              from(INSTALLER_SUBMISSIONS).
              leftOuterJoin(INSTALLER_TESTS.as("installer_tests")).on(INSTALLER_TESTS.INSTALLER_SUBMISSION_ID.equal(INSTALLER_SUBMISSIONS.ID)).
              leftOuterJoin(TESTJOBS.as("testjobs")).on(TESTJOBS.ID.equal(INSTALLER_TESTS.TESTJOB_ID)).
              leftOuterJoin(SCHEDULES.as("schedules")).on(SCHEDULES.ID.equal(TESTJOBS.SCHEDULE_ID)).
              leftOuterJoin(JOBSCHEDULES.as("jobschedules")).on(JOBSCHEDULES.ID.equal(TESTJOBS.JOBSCHEDULE_ID)).
              orderBy(INSTALLER_SUBMISSIONS.ID.asc(), TESTJOBS.UPDATED_AT.desc()).limit(10).
              fetch();

      LOG.info("records", records.formatJSON());

Format json contains only column names.
{"fields":[{"name":"id","type":"INTEGER"},{"name":"product_id","type":"INTEGER"},{"name":"user_id","type":"INTEGER"},{"name":"cb_installer_id","type":"INTEGER"},{"name":"submitted_at","type":"TIMESTAMP"},{"name":"metadata","type":"CLOB"},{"name":"title","type":"VARCHAR"},{"name":"promotion_state","type":"INTEGER"},{"name":"role","type":"VARCHAR"}],,"records":[]}

I want name field like this tablename.columname






Lukas Eder

unread,
Mar 11, 2015, 2:39:45 AM3/11/15
to jooq...@googlegroups.com
Hello,

We have a couple of feature requests on our roadmap to improve the formatting methods by adding support for customisation functionality. Perhaps, your idea might fit in.

I'm afraid that for now, you will have to implement your proper formatting / serialisation protocol.

Best Regards,
Lukas

--
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.
For more options, visit https://groups.google.com/d/optout.

Lukas Eder

unread,
Mar 11, 2015, 2:41:06 AM3/11/15
to jooq...@googlegroups.com
N.B: I've created issue #4133 for this:

Lukas Eder

unread,
Sep 13, 2015, 1:13:13 PM9/13/15
to jOOQ User Group
This is now implemented for jOOQ 3.7
Reply all
Reply to author
Forward
0 new messages