-
-
Notifications
You must be signed in to change notification settings - Fork 261
Description
Hello,
I continue to implement the support of SCALAR_ARRAY-arguments and see the following issue.
To pass an array into UDF with SCALAR_ARRAY-argument through parameter, server should provide client with names of these function and argument.
Client will use this information to obtain the information about type of array elements. Dimension of SCALAR_ARRAY-argument may be any.
Server does not generate and does not store names of UDF arguments - RDB$FUNCTION_ARGUMENTS::RDB$ARGUMENT_NAME is NULL.
As I understand, there are two solutions to this problem.
1. Server will return a runtime generated name.
I have already created and tested a code for the following format of this name:
"ARG<number1>_POS<number2>". For example - "ARG1_POS1".
where number1 is the index of SQL argument, number2 is the position of UDF argument (RDB$ARGUMENT_POSITION).
Client uses number2 (+UDF name) to load the necessary information from RDB$FUNCTION_ARGUMENTS.
Of course, client can use number1 but it will require the load of all arguments to find a required argument by its index.
2. Server will fill RDB$FUNCTION_ARGUMENTS::RDB$ARGUMENT_NAME
For example, server can use "ARG<number>" for input arguments and "RESULT" for result value.
For me. this way looks really better then (1) but required at least the recreation of exists UDF with SCALAR_ARRAY arguments.
I think, it is not a problem at all. Because, I'm sure such UDFs does not exist :)
I have not known how to implement (2) yet.
What do you think about (1) and (2)?