-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NULLIF expression function [FEATURE]
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "nullif", | ||
"type": "function", | ||
"description": "Returns a null value if value1 equals value2; otherwise it returns value1. This can be used to conditionally substitute values with NULL.", | ||
"arguments": [ {"arg":"value1", "description": "The value that should either be used or substituted with NULL."}, | ||
{"arg":"value2", "description": "The control value that will trigger the NULL substitution."}], | ||
"examples": [ { "expression":"nullif('(none)', '(none)')", "returns":"NULL"}, | ||
{ "expression":"nullif('text', '(none)')", "returns":"'text'"}, | ||
{ "expression":"nullif(\"name\", ''), "returns":"NULL, if name is an empty string (or already NULL), the name in any other case."} ] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters