feat: add frozen flag for complete immutability and simplify README examples

- Add frozen flag to separate data immutability from performance optimizations
  - readOnly: prevents data mutations but allows index optimizations (default behavior)
  - frozen: prevents ALL changes including statistics and index updates
  - Smart default: frozen=false when readOnly=true for optimal performance

- Add comprehensive documentation for read-only and frozen modes
  - Created docs/guides/readonly-frozen-modes.md with detailed guide
  - Added examples for compliance, forensics, and testing use cases
  - Updated all documentation indexes with new guide links

- Simplify README.md to emphasize unified API
  - Clearer demonstration that same code works everywhere
  - Simplified framework examples showing consistent API
  - Better noun/verb examples for entities and relationships
  - Collapsible sections for cloud platform examples
  - Environment auto-detection table

- Add tests for frozen flag behavior
  - Test readOnly without frozen (allows optimizations)
  - Test frozen mode (complete immutability)
  - Test dynamic mode switching

BREAKING CHANGE: readOnly behavior changed - now allows optimizations by default.
To get old behavior (complete immutability), use readOnly: true with frozen: true.
This commit is contained in:
David Snelling 2025-08-06 09:52:45 -07:00
parent 8976f274f3
commit e838327a22
6 changed files with 726 additions and 570 deletions

View file

@ -20,6 +20,14 @@ Optimize data ingestion with write-only mode.
- Performance optimization for writes
- Use cases and implementations
### 🔒 [Read-Only & Frozen Modes](../guides/readonly-frozen-modes.md)
Control immutability for different production scenarios.
- Read-only with optimizations (default)
- Completely frozen for compliance
- Dynamic mode switching
- Migration from older versions
### 💾 [Cache Configuration](../guides/cache-configuration.md)
Configure caching for optimal performance.