.. _f-sqlinterfacedatabase: module ``sql.sql_interface_database`` ===================================== .. inheritance-diagram:: pyensae.sql.sql_interface_database Short summary +++++++++++++ module ``pyensae.sql.sql_interface_database`` Abstract class to connect to a SQL server using various way. It will be used to implement magic functions :githublink:`%|py|7` Classes +++++++ +-----------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +=========================================================================================+===========================================================================================================+ | :class:`InterfaceSQLDatabase ` | Abstract class to connect to a SQL server using various way. It will be used to implement magic functions | +-----------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ Methods +++++++ +-----------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +===========================================================================================================+==============================================================================================================+ | :py:meth:`__init__ ` | | +-----------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :meth:`add_function ` | add a function to the database which can be called in a SELECT statement | +-----------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :meth:`close ` | close the connection to the database | +-----------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :meth:`connect ` | connection to the database | +-----------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :meth:`drop_table ` | drops a table | +-----------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :meth:`execute_clean_query ` | return the resuls of a SQL query | +-----------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :meth:`get_table_columns ` | returns the list of columns in a table | +-----------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :meth:`get_table_list ` | returns the list of tables in the database | +-----------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :meth:`import_dataframe ` | import a dataframe into the database | +-----------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :meth:`import_flat_file ` | import a flat file as a table, we assume the columns separator is ``\t`` and the file name contains a header | +-----------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: pyensae.sql.sql_interface_database :members: :special-members: __init__ :show-inheritance: