Interface GqlExecutor

All Known Implementing Classes:
DefaultGqlExecutor

public interface GqlExecutor
Executes a GqlMatchPlan against a graph and returns a lazy iterator of GqlRow result rows. DefaultGqlExecutor is the reference implementation.

When to implement this interface

This is the primary customization point for providers with a native query or traversal engine. Such a provider can keep DefaultGqlPlanner, getting GQL MATCH parsing and cardinality-guided join ordering for free, and replace only the executor to translate the GqlMatchPlan into native operations.

The contract for implementors:

  • Method Details

    • execute

      Iterator<GqlRow> execute(GqlMatchPlan plan)
      Executes the plan with no parameter bindings.
      Parameters:
      plan - the compiled execution plan
      Returns:
      a lazy iterator of result rows
    • execute

      Iterator<GqlRow> execute(GqlMatchPlan plan, Map<String,Object> params)
      Executes the plan with the given parameter bindings.
      Parameters:
      plan - the compiled execution plan
      params - parameter bindings for $name references in property predicates; may be empty if the query contains no parameter references
      Returns:
      a lazy iterator of result rows