File: //usr/lib/python3.9/site-packages/redis/commands/graph/__pycache__/execution_plan.cpython-39.pyc
a
��bV � @ s6 d dl Z G dd� d�ZG dd� d�ZG dd� d�ZdS )� Nc @ s e Zd ZdZdd� ZdS )�ProfileStatszB
ProfileStats, runtime execution statistics of operation.
c C s || _ || _d S �N)�records_produced�execution_time)�selfr r � r �G/usr/lib/python3.9/site-packages/redis/commands/graph/execution_plan.py�__init__ s zProfileStats.__init__N)�__name__�
__module__�__qualname__�__doc__r r r r r r s r c @ sH e Zd ZdZddd�Zdd� Zdd� Zeed �d
d�Z e
d�d
d�ZdS )� Operationz<
Operation, single operation within execution plan.
Nc C s || _ || _|| _g | _dS )z�
Create a new operation.
Args:
name: string that represents the name of the operation
args: operation arguments
profile_stats: profile statistics
N)�name�args�
profile_stats�children)r r r r r r r r s zOperation.__init__c C s* t |t�r| |u rtd��| j�|� | S )Nzchild must be Operation)�
isinstancer � Exceptionr �append)r �childr r r �append_child! s zOperation.append_childc C s
t | j�S r ��lenr )r r r r �child_count( s zOperation.child_count��o�returnc C s&