Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sqlite): fix json_array_length output type #4491

Conversation

IamTossan
Copy link
Contributor

@IamTossan
Copy link
Contributor Author

@weiznich I believe this will complete the feature

@weiznich
Copy link
Member

For json_array_lenght it's not required to unconditionally return a nullable value, as the only way to get a NULL return value is to pass in a NULL (not json null) value. Otherwise an integer is returned. That means if we know that the input value cannot be null, we also know that the output value cannot be null. That is exactly what the old signature already means.

@IamTossan
Copy link
Contributor Author

For json_array_lenght it's not required to unconditionally return a nullable value, as the only way to get a NULL return value is to pass in a NULL (not json null) value. Otherwise an integer is returned. That means if we know that the input value cannot be null, we also know that the output value cannot be null. That is exactly what the old signature already means.

I just double-checked, that's correct, my bad

@IamTossan IamTossan closed this Feb 14, 2025
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.

2 participants