kip-sql 0.0.1-alpha.8

build the SQL layer of KipDB database
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::optimizer::core::pattern::Pattern;
use crate::optimizer::heuristic::graph::{HepGraph, HepNodeId};
use crate::optimizer::OptimizerError;

/// A rule is to transform logically equivalent expression
pub trait Rule {
    /// The pattern to determine whether the rule can be applied.
    fn pattern(&self) -> &Pattern;

    fn apply(&self, node_id: HepNodeId, graph: &mut HepGraph) -> Result<(), OptimizerError>;
}