You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(objectql,core,seed): partial-success batch insert — beforeInsert fires once (#3172)
Root fix for the #3152 leftover: a batch that died in validation forced
bulkWrite's whole-batch degradation, re-running beforeInsert hooks on the
good rows (at-least-once side effects).
- engine.insertMany(object, rows, options): new partial-success entry.
Bad rows are culled per-row AFTER beforeInsert (encryption/validation/
autonumber failures each captured per row), survivors are written in
one driver batch, and the return is one outcome per input row in input
order ({ok,record} | {ok:false,error}). afterInsert, summary recompute
and realtime fire only for written rows; dead rows consume no
autonumber. Plain insert(array) semantics are untouched.
- bulkWrite gains an optional writeBatchPartial: per-row failures from it
are final verdicts (no writeOne degradation — that would re-fire the
hooks); only a THROWN error (transient, mismatch) still degrades.
- seed-loader's flushPendingInserts switches to writeBatchPartial and
feature-detects engine.insertMany (legacy engines keep the old
whole-array + degradation behavior).
- protocol.insertManyData: partial-success sibling of createManyData
(same readonly ingress strip), for the import runner.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01APnSDJneEDRh3Z51KGCLga
0 commit comments