docs: add asOf() time-travel to fork section
Good catch! The fork section mentioned fork() but not asOf(). These are complementary features: - fork() - writable clone for testing/experiments - asOf() - read-only time-travel queries CHANGES: - Add time-travel code example showing asOf() usage - Add asOf() to v5.0.0 feature list - Add 'time-travel debugging, audit trails' to use cases Now users can see the full Git-style workflow including time-travel.
This commit is contained in:
parent
a24a98228e
commit
5706b71292
1 changed files with 8 additions and 1 deletions
|
|
@ -257,19 +257,26 @@ const result = await brain.merge('test-migration', 'main', {
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(result) // { added: 1, modified: 0, conflicts: 0 }
|
console.log(result) // { added: 1, modified: 0, conflicts: 0 }
|
||||||
|
|
||||||
|
// Time-travel: Query database at any past commit (read-only)
|
||||||
|
const commits = await brain.getHistory({ limit: 10 })
|
||||||
|
const snapshot = await brain.asOf(commits[5].id)
|
||||||
|
const pastResults = await snapshot.find({ query: 'historical data' })
|
||||||
|
await snapshot.close()
|
||||||
```
|
```
|
||||||
|
|
||||||
**NEW in v5.0.0:**
|
**NEW in v5.0.0:**
|
||||||
- ✅ `fork()` - Instant clone in <100ms
|
- ✅ `fork()` - Instant clone in <100ms
|
||||||
- ✅ `merge()` - Merge with conflict resolution
|
- ✅ `merge()` - Merge with conflict resolution
|
||||||
- ✅ `commit()` - Snapshot state
|
- ✅ `commit()` - Snapshot state
|
||||||
|
- ✅ `asOf()` - Time-travel queries (query at any commit)
|
||||||
- ✅ `getHistory()` - View commit history
|
- ✅ `getHistory()` - View commit history
|
||||||
- ✅ `checkout()`, `listBranches()` - Full branch management
|
- ✅ `checkout()`, `listBranches()` - Full branch management
|
||||||
- ✅ CLI support for all features
|
- ✅ CLI support for all features
|
||||||
|
|
||||||
**How it works:** Snowflake-style COW shares HNSW index structures, copying only modified nodes (10-20% memory overhead).
|
**How it works:** Snowflake-style COW shares HNSW index structures, copying only modified nodes (10-20% memory overhead).
|
||||||
|
|
||||||
**Perfect for:** Safe migrations, A/B testing, feature branches, distributed development
|
**Perfect for:** Safe migrations, A/B testing, feature branches, distributed development, time-travel debugging, audit trails
|
||||||
|
|
||||||
[→ See Full Documentation](docs/features/instant-fork.md)
|
[→ See Full Documentation](docs/features/instant-fork.md)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue