home
·
contact
·
privacy
projects
/
plomtask
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add most basic Todo family relations.
[plomtask]
/
plomtask
/
db.py
diff --git
a/plomtask/db.py
b/plomtask/db.py
index e0a5d4f5df5426512c8a7552ca889c598dcaabfe..01bc3e940767eafcd7a3e728a5d73caf7b04aa79 100644
(file)
--- a/
plomtask/db.py
+++ b/
plomtask/db.py
@@
-2,8
+2,8
@@
from os.path import isfile
from difflib import Differ
from sqlite3 import connect as sql_connect, Cursor
from os.path import isfile
from difflib import Differ
from sqlite3 import connect as sql_connect, Cursor
-from typing import Any
-from plomtask.
misc
import HandledException
+from typing import Any
, Dict
+from plomtask.
exceptions
import HandledException
PATH_DB_SCHEMA = 'scripts/init.sql'
PATH_DB_SCHEMA = 'scripts/init.sql'
@@
-49,6
+49,10
@@
class DatabaseConnection:
def __init__(self, db_file: DatabaseFile) -> None:
self.file = db_file
self.conn = sql_connect(self.file.path)
def __init__(self, db_file: DatabaseFile) -> None:
self.file = db_file
self.conn = sql_connect(self.file.path)
+ self.cached_todos: Dict[int, Any] = {}
+ self.cached_days: Dict[str, Any] = {}
+ self.cached_process_steps: Dict[int, Any] = {}
+ self.cached_processes: Dict[int, Any] = {}
def commit(self) -> None:
"""Commit SQL transaction."""
def commit(self) -> None:
"""Commit SQL transaction."""