Mapepire-IBMi / mapepire-server

Server-side support for Code for IBM i
GNU General Public License v3.0
24 stars 8 forks source link

IN/INOUT/OUT support #41

Closed worksofliam closed 2 months ago

worksofliam commented 2 months ago

Happening with server 2.0.5.

SQL:

    create or replace procedure mapepire_test.procedure_test(
      in p1 integer,
      inout p2 integer,
      out p3 integer
    )
    BEGIN
      set p3 = p1 + p2;
      set p2 = 0;
    END

Input

{"id":"query6","type":"prepare_sql_execute","sql":"call mapepire_test.procedure_test(?, ?, ?)","rows":100,"parameters":[6,4,0]}

Result

{"id":"query6","parameter_count":3,"metadata":{"parameters":[{"type":"INTEGER","mode":"IN","precision":10,"scale":0,"name":"P1"},{"type":"INTEGER","mode":"INOUT","precision":10,"scale":0,"name":"P2"},{"type":"INTEGER","mode":"OUT","precision":10,"scale":0,"name":"P3"}]},"error":"Parameter type not valid.","success":false,"sql_state":"HY105","sql_rc":-99999}

I'd expect the server to return all parameters back in the JSON.