Skip to content

Recommended Pattern for Joining Tables and Producing Nested Structs #3394

Closed Answered by abonander
ahmed-said-jax asked this question in Q&A
Discussion options

You must be logged in to vote

We used that pattern quite a lot internally. There's nothing really wrong with it besides the amount of boilerplate.

At the end of the day, SQL just doesn't have great support for returning complex structured data in a way we can reliably typecheck, so needing a transformation step is understandable.

Making the query macros work with FromRow and the flatten attribute would improve the situation, that's discussed in #514.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ahmed-said-jax
Comment options

Answer selected by ahmed-said-jax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants