Extend ppx nested to nullable joins - #307
Open
jongleb wants to merge 1 commit into
Open
Conversation
jongleb
force-pushed
the
ppx-joined
branch
4 times, most recently
from
August 6, 2026 14:01
f847606 to
34bc839
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR puts a joined table into one field of the record, so where a LEFT JOIN used to give you an
optionon every column, now only that one field is anoption[@sqlgg.nested]already exists, but it does not accept anoptionfieldso you map the row yourself
and now
If a NULL turns up where it cannot be, this raises, and
default_nonebelow is the reader that givesNoneinstead~nullable_colsThis flag generates the reader that a
record optionfield callsThe record also needs one field that cannot be NULL
[@sqlgg.nested default_none]Reads the same, but a broken row gives
None, and it goes all the way down the treeOther attributes inside a relation
They all compose inside a relation
[@sqlgg.by]without a conversion is the one that does not nestReading such a record on its own is unchanged