seriesmarker.persistence.database module¶
-
db_add_series
(series)[source]¶ Adds a new series to the database.
Parameters: series ( Series
) – The series to add.Raises: EntityExistsException
-
db_get_series
(series_id=None)[source]¶ Queries the database for series.
Parameters: series_id (Integer or None) – The ID of the series to retrieve. Returns: The Series
related to the given ID or None if no entry matches the ID.Returns: An alphanumerically sorted list of all Series
in the database if no ID is specified (may be empty).
-
db_init
()[source]¶ Initializes the database.
Creates or connects to a database at a location, specified by the configuration file.
See also
Removes a given banner from the database.
Parameters: banner ( Banner
) – The banner to remove.
-
db_remove_episode
(episode)[source]¶ Removes a given episode from the database.
Parameters: episode ( Episode
) – The episode to remove.
-
db_remove_item
(item)[source]¶ Removes a generic (atomic) item from the database.
Todo
Check if item really is generic, dispatch to proper remove function otherwise.
Parameters: item – The item to remove.
-
db_remove_role
(role)[source]¶ Removes a given role from the database.
Parameters: role ( Role
) – The role to remove.
-
db_remove_season
(season)[source]¶ Removes a given season from the database.
Parameters: season ( Season
) – The season to remove.
-
db_remove_series
(series)[source]¶ Removes a given series from the database.
Parameters: series ( Series
) – The series to remove.Raises: EntityNotFoundException