pub fn rewrite_graph_patterns_with_progress<F>(
graph: &SqliteGraph,
rule: &RewriteRule,
bounds: RewriteBounds,
progress: &F,
) -> Result<RewriteResult, SqliteGraphError>where
F: ProgressCallback,Expand description
Applies rewrite rules with progress tracking.
Same as rewrite_graph_patterns but reports progress during the operation.
Useful for large graphs where rewriting may take time.
§Arguments
graph- The target graph to transformrule- Rewrite rule specifying pattern, replacement, and interfacebounds- Limits on the rewriting operationprogress- Callback for progress updates
§Progress Reports
- Finding pattern matches
- Applying each rewrite
- Validating the result
§Example
ⓘ
use sqlitegraph::{
algo::{rewrite_graph_patterns_with_progress, RewriteRule, RewriteBounds},
progress::ConsoleProgress,
};
let progress = ConsoleProgress::new();
let result = rewrite_graph_patterns_with_progress(
&graph,
&rule,
RewriteBounds::default(),
&progress
)?;