Hey!
I'm trying to parameterise an INSERT statement and feeding executeStatement an array of arrays so that I can batch INSERTs into a table.
However, it seems like instead of working (or failing), the driver never responds and the application just hangs.
Example:
const query = `INSERT INTO test(id) values(?)`.
const params = [[1], [2], [3]];
const session = /* call some code to get a DBX session /*
const op = session.executeStatement(query, { ordinalParameters: params })
...
If I fully create the INSERT query, INSERT INTO test(id) values (1), (2), (3), it works just fine.
I had a look at how executeStatement handles parameters and it doesn't seem to support arrays of arrays, so I am at loss of how to batch insert with parameterisation.
Env:
- Running on Node 20.x and version 1.8.4 of the driver.
Hey!
I'm trying to parameterise an INSERT statement and feeding
executeStatementan array of arrays so that I can batch INSERTs into a table.However, it seems like instead of working (or failing), the driver never responds and the application just hangs.
Example:
If I fully create the INSERT query,
INSERT INTO test(id) values (1), (2), (3), it works just fine.I had a look at how
executeStatementhandles parameters and it doesn't seem to support arrays of arrays, so I am at loss of how to batch insert with parameterisation.Env: