Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
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
Build couchbase-server-7.0.0-4004 contains query commit a3f047e with commit message:
MB-42970new Abort(error message) function