Mapepire-IBMi / mapepire-server

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

Using prepared sql statement followed by sql more, doesn't fetch more data #36

Closed jonnyz32 closed 2 months ago

jonnyz32 commented 2 months ago

Found out that when prepare sql statement is used, it doesn't populate it's own ResultSet variable (m_rs), causing subsequent sql_more statements to fail. Test failing with


Error: Result set was null
 ❯ Query.fetchMore src/query.ts:168:13
    166|     if (queryResult.success !== true) {
    167|       this.state = QueryState.ERROR;
    168|       throw new Error(
       |             ^
    169|         queryResult.error || `Failed to run query (unknown error)`
    170|       );
 ❯ test.timeout test/sql.test.ts:180:13```