Skip to main content

batch_mutate

Function batch_mutate 

Source
pub fn batch_mutate(
    project_root: &ProjectRoot,
    mutations: Vec<MutationRequest>,
    file_locks: Option<&FileLockManager>,
) -> Result<BatchMutationResult, AqlError>
Expand description

Execute multiple mutations in parallel across files.

Groups mutations by file, sorts within each file by byte offset (descending) to avoid offset shifting, parallelizes across files via rayon, and writes each file once after all its mutations are applied.