U
    Ú²g&  ã                   @   sp   d Z ddlmZ ddlmZ ddlmZmZ ejZej	Z	ej
Z
ejZejZejZejZejZG dd„ deƒZdS )	z;
Module gathering the various parts of the copy subsystem.
é    )ÚIOé   )ÚBuffer)Ú_copyÚ_copy_asyncc                   @   s2   e Zd ZdZee dœdd„Zeddœdd„ZdS )	Ú
FileWriterz§
    A `Writer` to write copy data to a file-like object.

    :param file: the file where to write copy data. It must be open for writing
        in binary mode.
    ©Úfilec                 C   s
   || _ d S ©Nr   )Úselfr	   © r   ú0/tmp/pip-unpacked-wheel-b_ea6rx_/psycopg/copy.pyÚ__init__   s    zFileWriter.__init__N)ÚdataÚreturnc                 C   s   | j  |¡ d S r
   )r	   Úwrite)r   r   r   r   r   r   "   s    zFileWriter.write)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úbytesr   r   r   r   r   r   r   r      s   r   N)r   Útypingr   Úabcr   Ú r   r   Z	AsyncCopyZAsyncWriterZAsyncLibpqWriterZAsyncQueuedLibpqWriterZCopyÚWriterZLibpqWriterZQueuedLibpqWriterr   r   r   r   r   Ú<module>   s   