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

Add docs for the new nullIf() function #767

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

gem-neo4j
Copy link
Contributor

@gem-neo4j gem-neo4j commented Oct 13, 2023

NullIf can be useful for handling special values like 0 or empty strings by replacing them with null, it can also be used in combination with coalesce to substitute the null values with something else. Another use case is to avoid division by zero errors, this is because division by null returns null, whereas division by 0 will error! It is a handy shorthand that SQL users will be familiar with.

@neo-technology-commit-status-publisher
Copy link
Collaborator

Thanks for the documentation updates.

The preview documentation has now been torn down - reopening this PR will republish it.

Copy link
Contributor

@loveleif loveleif left a comment

Choose a reason for hiding this comment

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

👍 (...except the build is failing for some reason)

@gem-neo4j gem-neo4j force-pushed the dev_nullif_function branch from 5bd5772 to 30cb951 Compare October 24, 2023 08:13
@gem-neo4j gem-neo4j marked this pull request as ready for review October 24, 2023 08:13
@gem-neo4j gem-neo4j force-pushed the dev_nullif_function branch from 30cb951 to 565a048 Compare October 24, 2023 08:23
@JPryce-Aklundh JPryce-Aklundh merged commit 70457cb into neo4j:dev Nov 3, 2023
2 checks passed
AlexicaWright pushed a commit to AlexicaWright/docs-cypher that referenced this pull request Nov 24, 2023
NullIf can be useful for handling special values like 0 or empty strings
by replacing them with null, it can also be used in combination with
coalesce to substitute the null values with something else. Another use
case is to avoid division by zero errors, this is because division by
null returns null, whereas division by 0 will error! It is a handy
shorthand that SQL users will be familiar with.

Co-authored-by: Jens Pryce-Åklundh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants