o
    ‹¨Êhÿ  ã                   @   sD   d Z ddlmZ ddlmZmZ G dd„ deƒZG dd„ deƒZd	S )
zÌ
    pyexcel.plugins.sources.sqlalchemy
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Representation of sqlalchemy sources

    :copyright: (c) 2015-2017 by Onni Software Ltd.
    :license: New BSD License
é    )ÚDB_SQLé   )ÚBookDbSourceÚSheetDbSourcec                   @   s,   e Zd ZdZ	d	dd„Zdd„ Zdd„ ZdS )
ÚSheetSQLAlchemySourcez:
    SQLAlchemy channeled sql database as data source
    Nc                 K   s*   || _ || _tj| tf||dœ|¤Ž d S )N)Úexport_columnsÚ
sheet_name)Ú_SheetSQLAlchemySource__sessionÚ_SheetSQLAlchemySource__tabler   Ú__init__r   )ÚselfÚsessionÚtabler   r   Úkeywords© r   úT/var/www/html/env/lib/python3.10/site-packages/pyexcel/plugins/sources/sqlalchemy.pyr      s   þü
ûzSheetSQLAlchemySource.__init__c                 C   s   | j | jgfS ©N©r	   r
   ©r   r   r   r   Úget_export_params    s   z'SheetSQLAlchemySource.get_export_paramsc                 C   ó   | j | jfS r   r   r   r   r   r   Úget_import_params#   ó   z'SheetSQLAlchemySource.get_import_params)NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r      s    
ÿr   c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚBookSQLSourcez7
    SQLAlchemy bridged multiple table data source
    c                 K   s$   || _ || _tj| tfi |¤Ž d S r   )Ú_BookSQLSource__sessionÚ_BookSQLSource__tablesr   r   r   )r   r   Útablesr   r   r   r   r   ,   s   zBookSQLSource.__init__c                 C   r   r   )r   r   r   r   r   r   Ú
get_params1   r   zBookSQLSource.get_paramsN)r   r   r   r   r   r!   r   r   r   r   r   '   s    r   N)r   Úpyexcel_io.constantsr   Ú
db_sourcesr   r   r   r   r   r   r   r   Ú<module>   s
    	