Hello Petri,

2014-07-01 9:25 GMT+02:00 <[email protected]>:

> Sorry that I was a bit slow to answer to this.
>
> You're welcome. Again, sorry for the confusion.
>>
>
> I think that this was a stupid developer problem (at least partially). For
> some reason I missed the created SQL query even though I read the SQL
> queries from my log file.
>

OK. Shame on us both ;-)


>
>
>> From an API user perspective, do you maybe have an idea how this could be
>> improved? While the concrete execution of this functionality is confusing,
>> the general idea is still useful. It would be great to have your feedback
>> on the issue, if you have any ideas:
>> https://github.com/jOOQ/jOOQ/issues/3356
>> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FjOOQ%2FjOOQ%2Fissues%2F3356&sa=D&sntz=1&usg=AFQjCNFbEHQbp4hDVksm2gnLWEKdNCTvmQ>
>>
>>
> Well, I am sure if the current is necessarily bad. The reason why I
> originally used it in the wrong way was that I thought that
>
>
>    1. I need to call the selectCount() so that I can create a count query
>    (like I have to call select() so that I can create a SELECT query).
>    2. fetchCount() and fetchOne() works in the same way (I need to call
>    one of them to obtain the query results).
>
> That's true, but fetchOne() (as well as fetchAny(), fetchMaps(),
fetchArray(), etc.) are just convenience methods for fetchLazy() and then
wrap the Cursor in some behaviour. fetchCount() is completely different in
that it does not actually execute the query it operates upon, but wraps
that query in another query. I think that reusing the word "fetch" here is
not optimal...

Also, for some reason I couldn't find a count query example from the
> reference manual. Does it have one?
>

The spring examples have some DSLContext.fetchCount(Table) examples:
http://www.jooq.org/doc/3.4/manual/getting-started/tutorials/jooq-with-spring/#N104FF

But that's not a really good clue :-)

Not all features are documented in the manual. But all of them are
documented in the Javadoc... Maybe, this particular feature deserves a
section in the manual, though:
https://github.com/jOOQ/jOOQ/issues/3368

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

Reply via email to