Fix batch insert monster cards
batch.add() clears all bindings, unlike vanilla JDBC
This commit is contained in:
@@ -36,8 +36,8 @@ public class MonsterCardDao {
|
|||||||
VALUES (?, ?, ?)
|
VALUES (?, ?, ?)
|
||||||
ON CONFLICT (chr_id, card_id)
|
ON CONFLICT (chr_id, card_id)
|
||||||
DO UPDATE SET level = excluded.level;""");
|
DO UPDATE SET level = excluded.level;""");
|
||||||
batch.bind(0, chrId);
|
|
||||||
cards.forEach(card -> {
|
cards.forEach(card -> {
|
||||||
|
batch.bind(0, chrId);
|
||||||
batch.bind(1, card.cardId());
|
batch.bind(1, card.cardId());
|
||||||
batch.bind(2, card.level());
|
batch.bind(2, card.level());
|
||||||
batch.add();
|
batch.add();
|
||||||
|
|||||||
Reference in New Issue
Block a user