Commit 276603b
fix(crud): inject default opts into varargs upsert
The varargs \`upsert(Options, Object...)\` and \`upsertObject(Options, Object...)\`
overloads forwarded their \`arguments\` straight to \`iprotoCall\`, producing a
3-arg wire call \`crud.upsert(space, tuple, operations)\` with no opts table.
CRUD rock 1.5.0+ (bundled with Tarantool 3.5.0) rejects that 3-arg form at
\`crud/compare/conditions.lua:93\` with \`ParseConditionError: Each condition
should be table, got "string" (condition 1)\`. The 4-arg form
\`(space, tuple, operations, opts)\` works because that overload delegates
through \`toTupleOperationsOptsArgs\`.
Fix: append \`DEFAULT_UPDATE_OPTIONS.getOptions()\` to the args when the caller
has not already supplied an opts map (last varargs element not a \`Map\`). The
guard preserves the existing 4-arg call from \`testUpsertParameters\`, which
deliberately passes its own options map.
Fixes \`TarantoolCrudClientTest#testUpsert\` on Tarantool 3.5.0.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent cd67d22 commit 276603b
3 files changed
Lines changed: 16 additions & 5 deletions
File tree
- tarantool-client/src/main/java/io/tarantool/client/factory
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
729 | | - | |
| 729 | + | |
| 730 | + | |
730 | 731 | | |
731 | 732 | | |
732 | 733 | | |
733 | 734 | | |
734 | | - | |
| 735 | + | |
| 736 | + | |
735 | 737 | | |
736 | 738 | | |
737 | 739 | | |
| |||
897 | 899 | | |
898 | 900 | | |
899 | 901 | | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
900 | 910 | | |
901 | 911 | | |
902 | 912 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
| |||
0 commit comments