mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-07 01:04:26 +01:00
Add comment for or replace behavior require seek in translate/insert
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user