U
    ±[Öeÿ  ã                   @   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-2022 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   úd/var/www/html/services/stratfitenv/lib/python3.8/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   s   | j | jfS r   r   r   r   r   r   Úget_import_params#   s    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|Ž d S r   )Ú_BookSQLSource__sessionÚ_BookSQLSource__tablesr   r   r   )r   r   Ztablesr   r   r   r   r   ,   s    zBookSQLSource.__init__c                 C   s   | j | jfS r   )r   r   r   r   r   r   Ú
get_params1   s    zBookSQLSource.get_paramsN)r   r   r   r   r   r   r   r   r   r   r   '   s   r   N)r   Zpyexcel_io.constantsr   Z
db_sourcesr   r   r   r   r   r   r   r   Ú<module>   s   	