• Resolve a PL/SQL top-level function by name.

    Returns

    a JavaScript function that will execute the PL/SQL function when called and returns the PL/SQL return value.

    Remarks

    Similarly to the SQL driver this package has to deal with translating types between PL/SQL and JavaScript. Some PL/SQL types can be translated into multiple JavaScript types, so the return type can be overridden.

    Example

    // Resolve top-level function.
    const exampleFunc = resolveFunction('my_func');
    // Execute the PL/SQL function simply by calling the JS function.
    const numberResult = exampleFunc(42);
    // Override the return type of the function.
    const oracleNumberResult = exampleFunc.returns(oracledb.ORACLE_NUMBER)(42);

    Parameters

    • name: string

    Returns DBSubprogram