Skip to content
13 changes: 12 additions & 1 deletion docs/book/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // Parameterized by tree type
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy

// Non-Merk tree append operations (user-facing):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

Each operation is wrapped in a `QualifiedGroveDbOp` that includes the path:

```rust
Expand Down
13 changes: 12 additions & 1 deletion docs/book/translations/ar/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // Parameterized by tree type
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy

// Non-Merk tree append operations (user-facing):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

كل عملية تُغلَّف في `QualifiedGroveDbOp` يتضمن المسار:

```rust
Expand Down
13 changes: 12 additions & 1 deletion docs/book/translations/cs/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // Parametrizovano typem stromu
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy

// Operace pridavani ne-Merk stromu (orientovane na uzivatele):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

Kazda operace je obalena v `QualifiedGroveDbOp`, ktery zahrnuje cestu:

```rust
Expand Down
13 changes: 12 additions & 1 deletion docs/book/translations/de/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // Parametrisiert nach Baumtyp
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Translation is missing the SubelementsDeletionBehavior enum documentation.

The English source documentation (docs/book/src/batch-operations.md) includes a dedicated section documenting the SubelementsDeletionBehavior enum with all four variants (DontCheck, Error, DeleteChildren, Skip). This German translation updates the DeleteTree signature but omits the corresponding enum definition block, leaving readers without an explanation of the new parameter.

Consider adding the translated enum documentation after line 30 to match the English source structure.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/book/translations/de/src/batch-operations.md` at line 16, The German
translation is missing the SubelementsDeletionBehavior enum docs referenced by
the DeleteTree(TreeType, SubelementsDeletionBehavior) signature; add a
translated enum documentation block for SubelementsDeletionBehavior (listing and
describing the four variants: DontCheck, Error, DeleteChildren, Skip) and insert
it in the document structure after the existing section around line 30 so the
translation matches the English source's structure and explains the new
parameter.


// Nicht-Merk-Baum-Anhängeoperationen (benutzerseitig):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

Jede Operation wird in ein `QualifiedGroveDbOp` verpackt, das den Pfad enthält:

```rust
Expand Down
13 changes: 12 additions & 1 deletion docs/book/translations/es/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // Parameterized by tree type
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy

// Non-Merk tree append operations (user-facing):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

Cada operación se envuelve en un `QualifiedGroveDbOp` que incluye la ruta:

```rust
Expand Down
13 changes: 12 additions & 1 deletion docs/book/translations/fr/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // Parameterized by tree type
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy

// Non-Merk tree append operations (user-facing):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

Chaque opération est enveloppée dans un `QualifiedGroveDbOp` qui inclut le chemin :

```rust
Expand Down
13 changes: 12 additions & 1 deletion docs/book/translations/id/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // Diparameterisasi berdasarkan tipe pohon
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy

// Operasi append pohon non-Merk (menghadap pengguna):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

Setiap operasi dibungkus dalam `QualifiedGroveDbOp` yang mencakup path:

```rust
Expand Down
13 changes: 12 additions & 1 deletion docs/book/translations/it/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // Parametrizzato per tipo di albero
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy

// Operazioni di append per alberi non-Merk (rivolte all'utente):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

Ogni operazione e avvolta in un `QualifiedGroveDbOp` che include il percorso:

```rust
Expand Down
13 changes: 12 additions & 1 deletion docs/book/translations/ja/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // Parameterized by tree type
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy

// Non-Merk tree append operations (user-facing):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

各操作はパスを含む `QualifiedGroveDbOp` でラップされます:

```rust
Expand Down
13 changes: 12 additions & 1 deletion docs/book/translations/ko/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // 트리 타입으로 매개변수화
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy

// 비-Merk 트리 추가 연산 (사용자 대면):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

각 연산은 경로를 포함하는 `QualifiedGroveDbOp`으로 래핑됩니다:

```rust
Expand Down
13 changes: 12 additions & 1 deletion docs/book/translations/pl/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // Parametryzowane typem drzewa
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy

// Operacje dopisywania drzew nie-Merk (uzytkownika):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

Kazda operacja jest opakowana w `QualifiedGroveDbOp` zawierajacy sciezke:

```rust
Expand Down
13 changes: 12 additions & 1 deletion docs/book/translations/pt/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // Parametrizado pelo tipo de arvore
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy

// Operacoes de append para arvores nao-Merk (voltadas ao usuario):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

Cada operacao e envolvida em um `QualifiedGroveDbOp` que inclui o caminho:

```rust
Expand Down
13 changes: 12 additions & 1 deletion docs/book/translations/ru/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // Parameterized by tree type
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy

// Non-Merk tree append operations (user-facing):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

Каждая операция обёрнута в `QualifiedGroveDbOp`, включающий путь:

```rust
Expand Down
13 changes: 12 additions & 1 deletion docs/book/translations/th/src/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum GroveOp {
Patch { element: Element, change_in_bytes: i32 },
RefreshReference { reference_path_type, max_reference_hop, flags, trust_refresh_reference },
Delete,
DeleteTree(TreeType), // กำหนดพารามิเตอร์ตามประเภทต้นไม้
DeleteTree(TreeType, SubelementsDeletionBehavior), // Per-op deletion policy
Comment thread
coderabbitai[bot] marked this conversation as resolved.

// การดำเนินการ append สำหรับต้นไม้ non-Merk (ผู้ใช้เรียกใช้):
CommitmentTreeInsert { cmx: [u8; 32], payload: Vec<u8> },
Expand All @@ -40,6 +40,17 @@ pub enum NonMerkTreeMeta {
}
```

**SubelementsDeletionBehavior** controls how a `DeleteTree` handles non-empty subtrees:

```rust
pub enum SubelementsDeletionBehavior {
DontCheck, // Skip emptiness check; caller guarantees tree is empty
Error, // Return Error::DeletingNonEmptyTree if non-empty
DeleteChildren, // Check, and recursively delete children if non-empty
Skip, // Check, and silently skip deletion if non-empty
}
```

แต่ละการดำเนินการถูกครอบด้วย `QualifiedGroveDbOp` ที่รวม path:

```rust
Expand Down
Loading
Loading