Details
-
Improvement
-
Resolution: Fixed
-
Major
-
Cheshire-Cat
-
1
Description
Consider this function:
CREATE FUNCTION variadic(...) { CASE WHEN array_length(args) != 1 THEN "wrong args: " || to_string(array_length(args)) WHEN type(args[0]) = "string" THEN args[0] ELSE "wrong type " || type(args[0]) || ": " || to_string(args[0]) END } |
Wouldn't it be nice to be able to return errors on wrong arguments?
Introduce a new predefined function abort(string) which returns nothing and generates an error based on the input string, so that N1QL UDFs (or other statements) can properly generate an error and terminate the request
Attachments
For Gerrit Dashboard: MB-42970 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
141958,2 | MB-42970 new Abort(error message) function | master | query | Status: MERGED | +2 | +1 |
142160,3 | MB-42970 redo Abort() | master | query | Status: MERGED | +2 | +1 |