This repository was archived by the owner on Mar 4, 2026. It is now read-only.
Commit 91f5afd
authored
fix: createQueryPartition with query params (#2244)
Create Query Partition with query params throw error, as params are encoded twice , once while creating partition and once while executing
```
const query = {
sql: 'SELECT * FROM Singers where SingerId > @id',
params: {
id: 1200,
},
};
const [partitions] = await transaction.createQueryPartitions(query);
partitions.forEach(partition => {
transaction.execute(partition).then(results => {
const rows = results[0].map(row => row.toJSON());
row_count += rows.length;
});
});
```1 parent 9673e26 commit 91f5afd
2 files changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
| |||
1500 | 1502 | | |
1501 | 1503 | | |
1502 | 1504 | | |
1503 | | - | |
1504 | | - | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
1505 | 1508 | | |
1506 | | - | |
| 1509 | + | |
1507 | 1510 | | |
1508 | 1511 | | |
1509 | 1512 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9420 | 9420 | | |
9421 | 9421 | | |
9422 | 9422 | | |
9423 | | - | |
| 9423 | + | |
| 9424 | + | |
| 9425 | + | |
| 9426 | + | |
9424 | 9427 | | |
9425 | 9428 | | |
9426 | 9429 | | |
| |||
0 commit comments