Skip to content

[TS] Fix returning a query from a view that returns an option#4408

Open
coolreader18 wants to merge 1 commit intomasterfrom
noa/fix-option-query
Open

[TS] Fix returning a query from a view that returns an option#4408
coolreader18 wants to merge 1 commit intomasterfrom
noa/fix-option-query

Conversation

@coolreader18
Copy link
Collaborator

Description of Changes

This was an issue in 1.x as well, so it's not theoretically blocking 2.0.

Expected complexity level and risk

1

Testing

  • Verified that shub's PersonAtLevel2 view works correctly now.

Copy link
Collaborator

@joshua-spacetime joshua-spacetime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, the type signature becomes a little misleading in this case because currently we don't have a way of determining statically whether a query builder view returns at most 1 row.

So I would say we don't want this change but rather would like to restrict the return type to array for query builder returns.

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.

3 participants