Hi Lukas,
I've taken some time to think of a cool feature that would useful. It
would be really handy to if column annotation was extensible enough to take
valid select clause expression as input and make it available to a pojo
getter. Best illustrated by example:
@Column(expression = "replace( '_', '-', col_bar) || 'replaced!' " name =
"FOO" )
public fooSetter( String foo) { ...}
On Thursday, November 17, 2016 at 1:51:46 AM UTC-5, Lukas Eder wrote:
>
> Hi Max,
>
> You're right. The readme files deserve some additional work, just like the
> code itself, where a few comments would certainly help.
>
> Hmm, there's a chapter about dynamic SQL here:
> http://www.jooq.org/doc/latest/manual/sql-building/dynamic-sql
>
> But I get what you're really saying here. All of that info is there
> somewhere, but as a new user, it's hard to get to the info. It might be
> possible to google it if the new user was trying around 20 different
> keywords (dynamic SQL, query building, predicate logic, etc. etc.) but it
> would be much easier if there was a "getting started" page (or section)
> that briefly illustrates the use-case with 1 paragraph, and then provides
> links to more details.
>
> I've created this issue to fix this:
> https://github.com/jOOQ/jOOQ/issues/5669
>
> Hope that responds to your suggestion? :)
>
> 2016-11-14 16:46 GMT+01:00 Max Kremer <[email protected] <javascript:>>
> :
>
>> Hi Lukas,
>>
>> I haven't seen those examples. Thanks for pointing them out. I went
>> through a couple of them and although the readme files are quite light :)
>> it seems those examples focus on specific technology examples.
>> When I mentioned example use-cases I was referring more to complex
>> predicate logic and query "building" rather than business use-cases like
>> ETL and reporting. Stuff like using multiple CTEs or inner queries,
>> dynamically generating join conditions and predicates, etc...
>>
>> Because JOOQ provides a rich object model it's possible to delegate
>> building various parts of the SQL to the appropriate business components.
>> So you can generate JOINS and WHERE clauses in completely different parts
>> of the code but it all comes together when you execute the SQL. I don't
>> know if I'm doing a good job explaining it - maybe I can provide some
>> examples if that helps.
>>
>>
>>>
>>>
>>> Thanks a lot for this input. Have you seen the examples on GitHub?
>>> https://github.com/jOOQ/jOOQ/tree/master/jOOQ-examples
>>>
>>> In any case, I do agree that they could use more explanations, perhaps
>>> in the form of comments... And I also think that they're not linked well
>>> enough from the manual.
>>>
>>> What do you mean by "example use-cases"? You mean concrete examples
>>> involving business use-cases like ETL, reporting, complex predicate logic?
>>>
>>> 2016-11-10 23:47 GMT+01:00 Max Kremer <[email protected]>:
>>>
>>>> Hey Lukas,
>>>>
>>>> Sorry for the super late reply. If I had to pick one thing to improve
>>>> it would definitely be the documentation. More comprehensive example code
>>>> along with detailed explanations. I know it's tuff to cover everything,
>>>> but
>>>> a broader set of example use-cases would've helped a lot in the beginning.
>>>>
>>>> On Saturday, October 29, 2016 at 3:47:41 AM UTC-4, Lukas Eder wrote:
>>>>>
>>>>> Hey Max,
>>>>>
>>>>> Thanks a lot for your very nice words. This is greatly appreciated!
>>>>>
>>>>> I always see room for improvement, even in a compliment, though :) May
>>>>> I ask, what's the biggest part of jOOQ having its learning curve? Is
>>>>> there
>>>>> anything that you can still recall now, after 2.5 years, that you think
>>>>> could be improved for new users? Can the "JOOQ Way" of doing things be
>>>>> conveyed more easily?
>>>>>
>>>>> Cheers,
>>>>> Lukas
>>>>>
>>>>> 2016-10-28 21:06 GMT+02:00 Max Kremer <[email protected]>:
>>>>>
>>>>>> I just have to say that JOOQ is AWESOME! We've been using it for
>>>>>> about 2.5 years now and it's really a joy to work with. Its a big
>>>>>> library
>>>>>> and has its learning curve but it crushes every ORM (or any other lib
>>>>>> that
>>>>>> wraps JDBC) out there. Once you get the "JOOQ Way" of doing things it
>>>>>> makes
>>>>>> for robust, easy to maintain and readable code. Thanks Lukas for all
>>>>>> your
>>>>>> hard work and support.
>>>>>>
>>>>>> -Max
>>>>>>
>>>>>> On Wednesday, July 6, 2016 at 8:16:44 AM UTC-4, Lukas Eder wrote:
>>>>>>
>>>>>>> Dear group,
>>>>>>>
>>>>>>> Part of jOOQ's success is its incredible amount of convenience
>>>>>>> methods that help reduce the boiler plate code at your side. We do this
>>>>>>> with massive overloading of API, for instance, when you work with
>>>>>>> fetch(),
>>>>>>> you may have noticed how many different types of fetch() there are in
>>>>>>> jOOQ.
>>>>>>>
>>>>>>> Just now, I have added yet another convenience method. A Converter
>>>>>>> constructor:
>>>>>>> https://github.com/jOOQ/jOOQ/issues/5398
>>>>>>>
>>>>>>> It looks like this:
>>>>>>>
>>>>>>> static <T, U> Converter<T, U> of(
>>>>>>> Class<T> fromType,
>>>>>>> Class<U> toType,
>>>>>>> Function<? super T, ? extends U> from,
>>>>>>> Function<? super U, ? extends T> to
>>>>>>> ) { ... }
>>>>>>>
>>>>>>> And also:
>>>>>>>
>>>>>>> static <T, U> Converter<T, U> ofNullable(
>>>>>>> Class<T> fromType,
>>>>>>> Class<U> toType,
>>>>>>> Function<? super T, ? extends U> from,
>>>>>>> Function<? super U, ? extends T> to
>>>>>>> ) {
>>>>>>> return of(
>>>>>>> fromType,
>>>>>>> toType,
>>>>>>> t -> t == null ? null : from.apply(t),
>>>>>>> u -> u == null ? null : to.apply(u)
>>>>>>> );
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>> The above allows for creating simple ad-hoc, one-liner converters,
>>>>>>> such as:
>>>>>>>
>>>>>>> Converter<String, Integer> converter =
>>>>>>> Converter.ofNullable(String.class, Integer.class,
>>>>>>> Integer::parseInt, Object::toString);
>>>>>>>
>>>>>>> What's your biggest "itch" in the jOOQ API, which jOOQ could
>>>>>>> "scratch", or rather, make go away by adding new convenience API?
>>>>>>>
>>>>>>> All ideas welcome!
>>>>>>> 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.
>>>>>>
>>>>>
>>>>> --
>>>> 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.
>>>>
>>>
>>> --
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
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.