
    q-Pho                    `    d dl mZ d dlmZ d dlmZ erd dlmZ d dlm	Z	  G d d          Z
dS )	    )annotations)TYPE_CHECKING)wrap_df)	DataFrame)PyInProcessQueryc                  2    e Zd ZdZddZddZdd	ZddZdS )InProcessQueryz
    A placeholder for an in process query.

    This can be used to do something else while a query is running.
    The queries can be cancelled. You can peek if the query is finished,
    or you can await the result.
    ipqr   returnNonec                    || _         d S )N)_inner)selfr
   s     [/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/polars/lazyframe/in_process.py__init__zInProcessQuery.__init__   s        c                8    | j                                          dS )z)Cancel the query at earliest convenience.N)r   cancelr   s    r   r   zInProcessQuery.cancel   s    r   DataFrame | Nonec                Z    | j                                         x}t          |          S dS )z
        Fetch the result.

        If it is ready, a materialized DataFrame is returned.
        If it is not ready it will return `None`.
        N)r   fetchr   )r   outs     r   r   zInProcessQuery.fetch   s.     ;$$&&&C33<<4r   r   c                N    t          | j                                                  S )zAwait the result synchronously.)r   r   fetch_blockingr   s    r   r   zInProcessQuery.fetch_blocking(   s    t{1133444r   N)r
   r   r   r   )r   r   )r   r   )r   r   )__name__
__module____qualname____doc__r   r   r   r    r   r   r	   r	      sn               
 
 
 
5 5 5 5 5 5r   r	   N)
__future__r   typingr   polars._utils.wrapr   polarsr   polars.polarsr   r	   r    r   r   <module>r&      s    " " " " " "             & & & & & & /      ......5 5 5 5 5 5 5 5 5 5r   