add DataStore.getTasks()
This commit is contained in:
parent
8f6345d478
commit
951bf59dab
14
DataStore.py
14
DataStore.py
@ -52,3 +52,17 @@ FROM projects
|
|||||||
c.close()
|
c.close()
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
return projects
|
return projects
|
||||||
|
|
||||||
|
def getTasks(self, projectid):
|
||||||
|
c = self.conn.cursor()
|
||||||
|
c.execute('''
|
||||||
|
SELECT id, name
|
||||||
|
FROM tasks
|
||||||
|
WHERE projectid = ?
|
||||||
|
''' % (projectid,))
|
||||||
|
tasks = {}
|
||||||
|
for row in c:
|
||||||
|
tasks[row[0]] = row[1]
|
||||||
|
c.close()
|
||||||
|
self.conn.commit()
|
||||||
|
return tasks
|
||||||
|
Loading…
x
Reference in New Issue
Block a user