o
    QDi                  	   @  s   d dl mZ d dlmZmZmZmZ ddlmZ ddl	m	Z	 ddl
mZ er.ddlmZmZ 	d ddd	ddd	dd
d!ddZdS )"    )annotations)TYPE_CHECKINGAnyListOptional   )FrictionlessException)platform)Resource)IOnProgressIOnRowNF)nametypefaston_rowon_progressuse_fallbackqsv_pathsourceOptional[Any]r   Optional[str]r   database_urlstrr   boolr   Optional[IOnRow]r   Optional[IOnProgress]r   r   optionsr   return	List[str]c                K  s\   t | tr| n	t| fd|i|	}
t |
tjjs#d|
j d}t||
j||||||dS )zIndex data into a databasedatatypezResource with data type "z" is not indexable)r   r   r   r   r   )
isinstancer
   r	   frictionless_resources	Indexabler   r   index)r   r   r   r   r   r   r   r   r   r   resourcenote r&   S/var/www/Datamplify/venv/lib/python3.10/site-packages/frictionless/actions/index.pyr#      s   r#   )N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )
__future__r   typingr   r   r   r   	exceptionr   r	   r$   r
   indexerr   r   r#   r&   r&   r&   r'   <module>   s"    