Skip to content

Added ISNULL return type #631

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

Merged
merged 4 commits into from
Jul 28, 2020
Merged

Added ISNULL return type #631

merged 4 commits into from
Jul 28, 2020

Conversation

torrayne
Copy link

Documentation

If expr is NULL, ISNULL() returns 1, otherwise it returns 0.

I've added isnull to return int as that's what mysql does.

MYSQL does understand true and false so maybe it should return bool instead of int. I'm not very familiar with how functionReturnType is used so I don't know if that's an option.

@torrayne
Copy link
Author

Would it be beneficial for me to go through all the functions and add their return types?

@kyleconroy
Copy link
Collaborator

Thanks!

Would it be beneficial for me to go through all the functions and add their return types?

At this time, no. The mysql package is deprecated. All current and future MySQL work is happening in the engine/dolphin. For functions, we're going to automatically generate the type signatures. See the work done for PostgreSQL in #550

@kyleconroy kyleconroy merged commit 6298e0b into sqlc-dev:master Jul 28, 2020
@kyleconroy
Copy link
Collaborator

I wrote up a bit more about the deprecation of the mysql package #633

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