slick/slick — pull request #939 by szeiger (2014-07-25 12:28:05+00:00)
Title: Nested Options

My current progress on nested and multi-column Options before I go on vacation.
- Pure Rep encoding without Column type: fully working
- Option type encoding: Looks good, this should work
- New Option extension methods typecheck, type-level tests are in NestingTest.testNestedOptions, They can all be defined in terms of fold

Next steps:
- Add flatten and flatMap methods
- Introduce SumType
- Add Nodes for Option-lifting (reuse OptionApply?) and SumType catamorphism
- Build the correct Reps and Nodes in the new operations
- Add a compiler phase (after forceOuterBinds?) that translates sum types into product types and sum type catamorphisms into equivalent operations on the product type
- Add new outer join methods based on Option types
- Translate the new joins into the correct product type representation (by adding a discriminator column and an extra projection on top of the join)