system.interfaces.query_processing.operators module¶
Abstract interface for query-processing operators.
- class system.interfaces.query_processing.operators.Operator(parent: Self | None, children: list[Self] | None)[source]¶
Bases:
ABCAbstract operator interface to construct QEPs.
- set_parent(parent: Self) None[source]¶
Set the parent operator that this operator pushes its output tuples to.
- Parameters:
parent – The parent operator to attach.
- abstractmethod interpret_open() None[source]¶
Interpreter: open() method in push-based iterator model, i.e., initializes the operator.
- abstractmethod interpret_next(tup: dict) None[source]¶
Interpreter: next() method in push-based iterator model, i.e., processes the given tuple and optionally pushes the next tuple to the parent operator. :param tup: Pushed tuple to process.
- abstractmethod interpret_close() None[source]¶
Interpreter: close() method in push-based iterator model, i.e., closes the operator. This may be used to free resources like temporary files.
- abstractmethod compile(emit: str = None) str[source]¶
Compiler: Compiles the QEP rooted at self into Python code. :param emit: Parent code to emit. :return: Compiled QEP.
- abstractmethod dump(indent: int = 0) None[source]¶
Prints the QEP rooted at self. :param indent: Indentation level.