- **Examples**: Added a new `flush-statistics-example.js` script to demonstrate the usage of the `flushStatistics` method for ensuring updated statistics after data insertion. - **Core**: - Implemented `flushStatistics` in the `BrainyData` class to allow immediate flushing of statistics to storage. - Updated `BaseStorageAdapter` with `flushStatisticsToStorage` to support flushing cached statistics. - Modified the `shutDown` method to ensure statistics are flushed before database shutdown. - **Documentation**: Added `statistics-flush-solution.md` to explain the batch update mechanism, the issue with delayed statistics updates, and how to manually flush statistics in storage. **Purpose**: Provide users with the ability to manually flush statistics for real-time accuracy, particularly useful for systems relying on immediate updates. Improved documentation and examples to guide developers in implementing and using this functionality effectively. |
||
|---|---|---|
| .. | ||
| cli-wrapper-example.js | ||
| flush-statistics-example.js | ||