Commit 593c41f
authored
Fix null element handling in array bind parameters (#1692)
PgParamDesc.prepare() applied the array element type's preEncoder function unconditionally to every array element, including nulls. For NUMERIC[] parameters this causes prepareNumeric() to be invoked on a null element, and the bound query never completes.
Skip the preEncoder call for null elements so they are preserved as SQL NULL, matching how non-array parameters already handle null.
Closes #1690
Signed-off-by: adityaanikam <adityanikam9502@gmail.com>1 parent 862a35d commit 593c41f
2 files changed
Lines changed: 11 additions & 1 deletion
File tree
- vertx-pg-client/src
- main/java/io/vertx/pgclient/impl/codec
- test/java/io/vertx/tests/pgclient/data
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
538 | 548 | | |
539 | 549 | | |
540 | 550 | | |
| |||
0 commit comments