Skip to content

Name of UDF arguments #7843

@dmitry-lipetsk

Description

@dmitry-lipetsk

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)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions