selene-db-gql 1.3.0

ISO/IEC 39075:2024 GQL parser, planner, optimizer, and executor for selene-db.
Documentation
//! Worst-case optimal marker execution.

use crate::{
    JoinTree,
    runtime::{Binding, ExecutorError},
};

use super::pattern;

pub(crate) fn execute_phase_a(
    intersection: &[JoinTree],
    env: pattern::WalkContext<'_, '_, '_, '_, '_, '_>,
) -> Result<Vec<Binding>, ExecutorError> {
    let [inner] = intersection else {
        return Err(ExecutorError::ImplementationDefined {
            detail: if intersection.is_empty() {
                "WorstCaseOptimal with empty intersection"
            } else {
                "WorstCaseOptimal with multiple intersections"
            },
        });
    };
    pattern::walk_join_tree(inner, env)
}