.. _f-sqlinterface: module ``sql.sql_interface`` ============================ .. inheritance-diagram:: pyensae.sql.sql_interface Short summary +++++++++++++ module ``pyensae.sql.sql_interface`` 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:`AutoCompletionSQLObject ` | a simple class which allows auto completion for tables, columns... | +--------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ | :class:`InterfaceSQL ` | Abstract class to connect to a SQL server using various way. It will be used to implement magic functions | +--------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ | :class:`InterfaceSQLException ` | a specific exception | +--------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ Properties ++++++++++ +----------------------------------------------------------------------+-------------------------------------+ | property | truncated documentation | +======================================================================+=====================================+ | :py:meth:`_ ` | returns the true name of the object | +----------------------------------------------------------------------+-------------------------------------+ | :py:meth:`_f ` | returns the filtered name | +----------------------------------------------------------------------+-------------------------------------+ Static Methods ++++++++++++++ +------------------------------------------------------------------------------------------+--------------------------------+ | staticmethod | truncated documentation | +==========================================================================================+================================+ | :py:meth:`_filter_name ` | removes unavailable characters | +------------------------------------------------------------------------------------------+--------------------------------+ | :meth:`create ` | | +------------------------------------------------------------------------------------------+--------------------------------+ Methods +++++++ +------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +==========================================================================================+======================================================================================================================+ | :py:meth:`__init__ ` | creates an instance with a given name | +------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | Initializes the object. | +------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__str__ ` | usual | +------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_add ` | add a subname to the class | +------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :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 ` | execute a SQL query | +------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`execute_clean_query ` | The function does the same thing as :meth:`execute` but it does not replace autocompletion object. It is ... | +------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :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 | +------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`populate_completion ` | the method create an object which contains a class the user could use to speed the typing SQL queries, functions ... | +------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`process_query ` | replaces autocompletion object by their real names | +------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :meth:`refresh_completion ` | refresh the auto completion | +------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: pyensae.sql.sql_interface :members: :special-members: __init__ :show-inheritance: