On 9 Dec 2015, at 2:28, Lukas Eder wrote: > I wonder, however, if automatically omitting NULL values from grouped lists / > nested collections is really correct. In some cases, NULL might be ..... > > I wonder if there's really a thorough solution for this?
Definitely agree that you wouldn't want to automatically omit the nulls, three options spring to mind ( all of which are not necessarily good, but maybe good for thinking about ): 1. A new `PartialRecordMatcher` that returns an `Option<T>` and various over loaded methods to accept it _only_ on the value mapper side. 2. Keep the same interfaces, but a new (stack trace less) `AbsentValueException` to indicate this invocation has no value - ugly, not nice to reason with - ignore me :) 3. A new `group(...)` method set similar to `intoGroup` but returning a new intermediate `SelectGroupStep` with methods such as `omitNullValues()` etc. I wonder if any other users have come across similar use cases? If using #1, I wonder if there would be any other places were accepting a `PartialRecordMapper` would make sense, but outside of `intoGroups` or `intoMap` I'm not sure if there would be? Mark -- Mark Derricutt http://www.theoryinpractice.net http://www.chaliceofblood.net http://plus.google.com/+MarkDerricutt http://twitter.com/talios http://facebook.com/mderricutt -- 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.
signature.asc
Description: OpenPGP digital signature
