db.Timelines Class Reference
Pack utilities for timelines table.
More...
List of all members.
|
Classes |
class | DoesNotExist |
| Raised when a database object does not exist. More...
|
Public Member Functions |
def | add_timeline |
| Insert a new timeline based on a path.
|
def | get_path |
| Path of a timeline.
|
def | get_timeline |
| Timeline based on a path.
|
def | get |
| Fields of a timeline.
|
def | check_db |
| Check database and insert the base timeline if it's needed.
|
Detailed Description
Pack utilities for timelines table.
Definition at line 19 of file db.py.
Member Function Documentation
def db.Timelines.add_timeline |
( |
|
p |
) |
|
Insert a new timeline based on a path.
- Parameters:
-
| p | path represented by the timeline |
- Returns:
- the new id
- Exceptions:
-
| pysqlite2.dbapi2.IntegrityError | if the path is already in the database |
Definition at line 35 of file db.py.
def db.Timelines.check_db |
( |
|
) |
|
Check database and insert the base timeline if it's needed.
Definition at line 139 of file db.py.
def db.Timelines.get |
( |
|
id |
) |
|
Fields of a timeline.
- Parameters:
-
| id | id of the timeline to be retrieved |
- Returns:
- fields of the timeline with that id in a dictionary fashion
Definition at line 125 of file db.py.
def db.Timelines.get_path |
( |
|
id |
) |
|
Path of a timeline.
- Parameters:
-
- Returns:
- the path linked to a timeline id
- Exceptions:
-
| Timeline.DoesNotExist,: | when the id is not within the db |
Definition at line 85 of file db.py.
def db.Timelines.get_timeline |
( |
|
p |
) |
|
Timeline based on a path.
- Parameters:
-
| p | path of the timeline to look for |
- Returns:
- id of the timeline linked to the path
- Exceptions:
-
| Timeline.DoesNotExist,: | when there is no timeline linked to the path |
Definition at line 102 of file db.py.
The documentation for this class was generated from the following file: