Skip to content

Conversation

lorenz
Copy link

@lorenz lorenz commented Oct 15, 2023

This now supports evaluating nullability if subqueries, function-defined tables or sqlc.embed macros are involved.
If nullable embeds are generated, this now errors out instead of emitting code which breaks at runtime.

Generating correct type definitions for that case would be easy, but scanning data into embed pointers is hard as it would require "peeking" at row nullability to decide if the type should be allocated and scanned into. Otherwise the null columns need to be directed into some kind of sink. Because this is nontrivial to do this is not part of this PR.

This now supports evaluating nullability if subqueries, function-defined
tables or sqlc.embed macros are involved.
If nullable embeds are generated, this now errors out instead of
emitting code which breaks at runtime.

Generating correct type definitions for that case would be easy, but
scanning data into embed pointers is hard as it would require "peeking"
at row nullability to decide if the type should be allocated and scanned
into. Otherwise the null columns need to be directed into some kind
of sink. Because this is nontrivial to do this is not part of this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant