
    ˀho                    X    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
y)	    )annotations)TYPE_CHECKING)wrap_df)	DataFrame)PyInProcessQueryc                  0    e Zd ZdZddZddZd	dZd
dZy)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.
    c                    || _         y )N)_inner)selfipqs     w/var/www/html/wine-match-dev/backend/winematch-backend/venv/lib/python3.12/site-packages/polars/lazyframe/in_process.py__init__zInProcessQuery.__init__   s	        c                8    | j                   j                          y)z)Cancel the query at earliest convenience.N)r   cancelr   s    r   r   zInProcessQuery.cancel   s    r   c                R    | j                   j                         x}t        |      S y)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<r   c                H    t        | j                  j                               S )zAwait the result synchronously.)r   r   fetch_blockingr   s    r   r   zInProcessQuery.fetch_blocking(   s    t{{11344r   N)r   r   returnNone)r   r   )r   zDataFrame | None)r   r   )__name__
__module____qualname____doc__r   r   r   r    r   r   r	   r	      s    
5r   r	   N)
__future__r   typingr   polars._utils.wrapr   polarsr   polars.polarsr   r	   r   r   r   <module>r%      s!    "   & .5 5r   