← Winnitude! Search  ·  Reader Mode (1541 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 20 LINKS

fix: prevent batch insert loss during unique validation by 014-code · Pull Request #866 · APIJSON/APIJSON

Repository navigation

fix: prevent batch insert loss during unique validation - #866


Merged
TommyLemon merged 1 commit into APIJSON:master from 014-code:codex/fix-865-verifier-sql-executor Jul 14, 2026
Merged

fix: prevent batch insert loss during unique validation #866 TommyLemon merged 1 commit into APIJSON:master from 014-code:codex/fix-865-verifier-sql-executor

Conversation

014-code commented Jul 14, 2026



Copy link Copy Markdown
Contributor

Summary

Fixes #865 .

When batch inserting data with unique validation enabled, only the last record was committed successfully.

verifyExist and verifyRepeat previously reused the parser's shared SQL executor. Their cleanup logic closed that executor and cleared its connection map, causing previously inserted records to be excluded from the final transaction commit.

This change creates an independent SQL executor for verifier checks and binds it to the current parser, keeping verifier lifecycle management isolated from the parser transaction.

Changes

  • Use parser.createSQLExecutor() in verifyExist
  • Use parser.createSQLExecutor() in verifyRepeat
  • Bind the new executor with executor.setParser(parser)
  • Preserve the parser's shared executor for batch insert transactions

Verification

  • mvn -q -f APIJSONORM/pom.xml test passed
  • git diff --check passed
fix: isolate verifier SQL executor for validation APIJSON#865 1f41d45 TommyLemon merged commit ee359ae into APIJSON : master Jul 14, 2026 1 check passed

TommyLemon commented Jul 14, 2026



Copy link Copy Markdown
Member

Thank you for your contribution~

Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment

Labels

None yet

2 participants