Skip to content

Commit 69274db

Browse files
committed
feat(typed_digraph): derive Clone on TypedDiGraph, bump 3.0.7
1 parent 28038c2 commit 69274db

10 files changed

Lines changed: 36 additions & 27 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# SQLiteGraph Changelog
22

3+
## [3.0.7] - 2026-05-29
4+
5+
### Added
6+
7+
- **TypedDiGraph Clone derive**`TypedDiGraph<N, E>` now implements `Clone`
8+
(requires `N: Clone, E: Clone`).
9+
310
## [3.0.6] - 2026-05-29
411

512
### Added

docs/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ cargo build --workspace
4040
cargo test --workspace
4141

4242
# Run with Native V2 feature
43-
cargo build --workspace --features native-v2
43+
cargo build --workspace --features native-v3
4444
```
4545

4646
### Development Tools
@@ -200,7 +200,7 @@ impl GraphBackend for MyBackend {
200200

201201
```bash
202202
# All tests
203-
cargo test --workspace --features native-v2
203+
cargo test --workspace --features native-v3
204204

205205
# Integration tests
206206
cargo test --test api_ergonomics_tests
@@ -488,7 +488,7 @@ Brief description of changes.
488488
6. Add to MANUAL.md Section 4
489489
7. Add CLI command if applicable
490490

491-
### Adding to Native V2 Backend
491+
### Adding to Native V3 Backend
492492

493493
1. Understand the V2 format (see ARCHITECTURE.md)
494494
2. Update WAL records if adding new operations
@@ -521,7 +521,7 @@ Brief description of changes.
521521
Include:
522522
- Minimal reproduction case
523523
- Rust version (`rustc --version`)
524-
- Backend used (SQLite or Native V2)
524+
- Backend used (SQLite or Native V3)
525525
- Error messages and stack traces
526526
- Expected vs actual behavior
527527

docs/INDEX.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This index provides navigation for all SQLiteGraph documentation.
3636
- Performance benchmarks
3737

3838
2. **[MANUAL.md](../MANUAL.md)** - Detailed guide
39-
- Backend selection (SQLite vs Native V2)
39+
- Backend selection (SQLite vs Native V3)
4040
- Core operations
4141
- Graph algorithms
4242
- Vector search (HNSW)
@@ -60,7 +60,7 @@ This index provides navigation for all SQLiteGraph documentation.
6060
| **Vector Search** | MANUAL.md | HNSW Vector Search |
6161
| **Pub/Sub Events** | MANUAL.md | Section 14: Pub/Sub Events |
6262
| **Error Handling** | MANUAL.md | Error Handling |
63-
| **Migration** | MIGRATION.md | SQLite to Native V2 |
63+
| **Migration** | MIGRATION.md | SQLite to Native V3 |
6464
| **Troubleshooting** | TROUBLESHOOTING.md | Common Issues |
6565
| **Design Philosophy** | PHILOSOPHY.md | Principles |
6666

docs/PHILOSOPHY.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The core principles that guide SQLiteGraph's development.
3535

3636
**Examples:**
3737

38-
### Clustered Storage (Native V2)
38+
### Clustered Storage (Native V3)
3939

4040
We *could* make clustered storage faster with:
4141
- Complex rebalancing algorithms
@@ -99,7 +99,7 @@ Full MVCC includes:
9999

100100
**Why two backends:**
101101

102-
| SQLite Backend | Native V2 Backend |
102+
| SQLite Backend | Native V3 Backend |
103103
|----------------|-------------------|
104104
| Proven reliability | Performance for star patterns |
105105
| Ecosystem tooling | Smaller file sizes |
@@ -188,7 +188,7 @@ Each command:
188188

189189
| Limitation | Why It Exists | Plan |
190190
|------------|---------------|------|
191-
| ~2,048 nodes (Native V2) | 8MB node region keeps format simple | V3 backend with dynamic allocation |
191+
| ~2,048 nodes (Native V3) | 8MB node region keeps format simple | V3 backend with dynamic allocation |
192192
| Single writer | Simplifies concurrency | Future: multi-writer with conflict resolution |
193193
| No distributed queries | Embedded-only design | Not planned |
194194
| Chain traversal regression (V2) | Cluster lookup overhead | Not planned; use SQLite for chains |
@@ -333,11 +333,11 @@ txn.commit()?; // Clear when data is written
333333

334334
```toml
335335
# Bad: Features enabled by default
336-
sqlitegraph = "1.5.7" # What features are enabled?
336+
sqlitegraph-core = "3.0" # What features are enabled?
337337

338338
# Good: Explicit opt-in
339-
sqlitegraph = { version = "1.5.7", features = ["native-v2"] }
340-
sqlitegraph = "1.5.7" # SQLite only, no features
339+
sqlitegraph = { version = "1.5.7", features = ["native-v3"] }
340+
sqlitegraph-core = "3.0" # SQLite only, no features
341341
```
342342

343343
### No Global State

docs/TESTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ cargo test test_bfs_traversal
169169
cargo test --test bfs_tests
170170

171171
# Run tests with Native V2 feature
172-
cargo test --workspace --features native-v2
172+
cargo test --workspace --features native-v3
173173

174174
# Run tests with debug output
175175
cargo test --workspace --features debug
@@ -552,7 +552,7 @@ The project uses GitHub Actions for CI. Key workflows:
552552
553553
```bash
554554
# Run what CI runs
555-
cargo test --workspace --features native-v2
555+
cargo test --workspace --features native-v3
556556
cargo test --workspace --doc
557557
cargo clippy -- --deny warnings
558558
```
@@ -588,7 +588,7 @@ cargo clippy -- --deny warnings
588588
cargo install cargo-tarpaulin
589589

590590
# Generate coverage report
591-
cargo tarpaulin --workspace --features native-v2 --out Html
591+
cargo tarpaulin --workspace --features native-v3 --out Html
592592

593593
# Open report
594594
open tarpaulin-report.html

docs/TROUBLESHOOTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ vcpkg install sqlite3
4747
# Then set SQLITE3_LIB_PATH environment variable
4848
```
4949

50-
### "Feature native-v2 not found"
50+
### "Feature native-v3 not found"
5151

52-
**Symptom:** Build fails with `error: unused manifest key: sqlitegraph/native-v2`
52+
**Symptom:** Build fails with `error: unused manifest key: sqlitegraph-core/native-v3`
5353

5454
**Cause:** Native V2 is a feature flag, not a separate crate.
5555

@@ -58,7 +58,7 @@ vcpkg install sqlite3
5858
```toml
5959
# In your Cargo.toml
6060
[dependencies]
61-
sqlitegraph = { version = "1.5.7", features = ["native-v2"] }
61+
sqlitegraph = { version = "3.0", features = ["native-v3"] }
6262
```
6363

6464
### "Functionality mismatch: expected 7, found 5" (Internal)
@@ -125,7 +125,7 @@ for handle in handles {
125125
}
126126
```
127127

128-
**Solution (Native V2):** Native V2 also serializes writes via WAL. Use a similar approach.
128+
**Solution (Native V2):** Native V3 also serializes writes via WAL. Use a similar approach.
129129

130130
### "Node not found: 12345"
131131

@@ -222,7 +222,7 @@ println!("Cache hits: {}/{}", stats.cache_hits(), stats.cache_lookups());
222222
}
223223
```
224224

225-
3. **Consider Native V2 for star-pattern graphs:**
225+
3. **Consider Native V3 for star-pattern graphs:**
226226
```bash
227227
# Benchmark both backends
228228
time sqlitegraph --backend sqlite --db mygraph.db bfs --start 1 --max-depth 5
@@ -282,8 +282,8 @@ let graph = open_graph("mygraph.db", &cfg)?;
282282
let graph = open_graph("mygraph.db", &cfg)?;
283283
```
284284

285-
3. **Use Native V2 for write-heavy workloads:**
286-
- Native V2: 1.3-3.2x faster inserts
285+
3. **Use Native V3 for write-heavy workloads:**
286+
- Native V3: 1.3-3.2x faster inserts
287287

288288
---
289289

@@ -400,7 +400,7 @@ let value = graph.kv_get(&key)?;
400400
**Solution:** Upgrade to latest version:
401401
```toml
402402
[dependencies]
403-
sqlitegraph = "1.5.7"
403+
sqlitegraph-core = "3.0"
404404
```
405405

406406
If the issue persists, the database may be corrupted:

sqlitegraph-cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sqlitegraph-cli"
3-
version = "3.0.6"
3+
version = "3.0.7"
44
edition = "2021"
55
description = "Command-line interface for SQLiteGraph — embedded graph and vector runtime with Cypher-inspired queries"
66
license = "GPL-3.0-only"
@@ -20,7 +20,7 @@ name = "sqlitegraph"
2020
path = "src/main.rs"
2121

2222
[dependencies]
23-
sqlitegraph = { path = "../sqlitegraph-core", version = "3.0.6", default-features = false }
23+
sqlitegraph = { path = "../sqlitegraph-core", version = "3.0.7", default-features = false }
2424
serde_json = "1"
2525
clap = { version = "4", features = ["derive"] }
2626
anyhow = "1"

sqlitegraph-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sqlitegraph"
3-
version = "3.0.6"
3+
version = "3.0.7"
44
edition = "2024"
55
rust-version = "1.89"
66
description = "Embedded graph database with full ACID transactions, HNSW vector search, dual backend support, and comprehensive graph algorithms library"

sqlitegraph-core/src/typed_digraph/graph.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ impl From<usize> for EdgeIndex {
3636
}
3737
}
3838

39+
#[derive(Clone)]
3940
struct EdgeEntry<E> {
4041
from: usize,
4142
to: usize,
4243
weight: Option<E>,
4344
}
4445

46+
#[derive(Clone)]
4547
pub struct TypedDiGraph<N, E> {
4648
nodes: Vec<Option<N>>,
4749
edges: Vec<Option<EdgeEntry<E>>>,

sqlitegraph-py/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ default = []
1616
inference = ["dep:numpy", "dep:ndarray"]
1717

1818
[dependencies]
19-
sqlitegraph = { version = "3.0.6", path = "../sqlitegraph-core" }
19+
sqlitegraph = { version = "3.0.7", path = "../sqlitegraph-core" }
2020
pyo3 = { version = "0.28", features = ["extension-module", "abi3-py310"] }
2121
serde_json = "1"
2222
numpy = { version = "0.28", optional = true }

0 commit comments

Comments
 (0)