Add comment for or replace behavior require seek in translate/insert

This commit is contained in:
PThorpe92
2025-11-17 08:41:22 -05:00
parent 0ce5f81008
commit 8cd33f3ec9

View File

@@ -412,6 +412,9 @@ pub fn translate_insert(
}
let mut insert_flags = InsertFlags::new();
// For the case of OR REPLACE, we need to force a seek on the insert, as we may have
// already deleted the conflicting row and the cursor is not guaranteed to be positioned.
if matches!(ctx.on_conflict, ResolveType::Replace) {
insert_flags = insert_flags.require_seek();
}