.. _f-dbmanager: module ``dbmanager`` ==================== .. inheritance-diagram:: lightmlboard.dbmanager Short summary +++++++++++++ module ``lightmlboard.dbmanager`` Manages a sqlite3 database to store the results. :githublink:`%|py|5` Classes +++++++ +---------------------------------------------------------------------------+------------------------------------------------------------+ | class | truncated documentation | +===========================================================================+============================================================+ | :class:`DatabaseCompetition ` | Holds the data used for competitions. Tables: Competitions | +---------------------------------------------------------------------------+------------------------------------------------------------+ Properties ++++++++++ +----------------------------------------------------------------------------+-------------------------+ | property | truncated documentation | +============================================================================+=========================+ | :meth:`Connection ` | Returns the connexion. | +----------------------------------------------------------------------------+-------------------------+ Static Methods ++++++++++++++ +-----------------------------------------------------------------------------------------------+-------------------------+ | staticmethod | truncated documentation | +===============================================================================================+=========================+ | :py:meth:`_col_competitions ` | | +-----------------------------------------------------------------------------------------------+-------------------------+ | :py:meth:`_col_players ` | | +-----------------------------------------------------------------------------------------------+-------------------------+ | :py:meth:`_col_submissions ` | | +-----------------------------------------------------------------------------------------------+-------------------------+ | :py:meth:`_col_teams ` | | +-----------------------------------------------------------------------------------------------+-------------------------+ | :py:meth:`_dummy_submissions ` | | +-----------------------------------------------------------------------------------------------+-------------------------+ Methods +++++++ +------------------------------------------------------------------------------------------+---------------------------------------------------------------------+ | method | truncated documentation | +==========================================================================================+=====================================================================+ | :py:meth:`__init__ ` | | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------+ | :py:meth:`_init ` | Creates the tables if not present. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------+ | :meth:`get_competition ` | Retrieves a competition. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------+ | :meth:`get_competitions ` | Returns the list of competitions as list of ``(cpt_id, cpt_name)``. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------+ | :meth:`get_cpt_id ` | Returns the list of competation id. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------+ | :meth:`get_player_id ` | Returns the list of competation id. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------+ | :meth:`get_results ` | Retrieves the results of a competition. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------+ | :meth:`init_from_options ` | Initializes the database. It skips a table if it exists. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------+ | :meth:`submit ` | Adds a submission to the database. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------+ | :meth:`to_df ` | Returns the content of a table as a dataframe. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: lightmlboard.dbmanager :members: :special-members: __init__ :show-inheritance: