missing fetchOne() overoads for returning()

30 views
Skip to first unread message

Garret Wilson

unread,
Apr 14, 2014, 10:45:20 AM4/14/14
to jooq...@googlegroups.com
I'm very new to jOOQ and very rusty at SQL, so forgive me if I'm missing something obvious.

If I do a query returning a single record, I can easily get the single value from the row like this:

select(...).from(...).where(...).fetchOne(0, Integer.class);

But when I'm doing an insert using returning(), I don't have all those fancy featching options:

insertInto(...).values(...).returning(...).fetchOne(0, IntegerClass);

Instead I have to do:

insertInto(...).values(...).returning(...).fetchOne().getValue(0, IntegerClass);

I guess when the convenience methods were added someone forgot to add them to InsertReturningStep.

Lukas Eder

unread,
Apr 14, 2014, 1:32:47 PM4/14/14
to jooq...@googlegroups.com
Hi Garret,

Thanks for pointing this out. You're right, there are some missing convenience methods to be consistent with other API. I have registered #3185 for this.

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.

Reply all
Reply to author
Forward
0 new messages