added DataStore.getProjects()

This commit is contained in:
Josh Holtrop 2011-02-10 16:09:00 -05:00
parent 757f325ae9
commit 8f6345d478

View File

@ -39,3 +39,16 @@ CREATE TABLE hours (
conn.commit()
c.close()
conn.close()
def getProjects(self):
c = self.conn.cursor()
c.execute('''
SELECT id, name
FROM projects
''')
projects = {}
for row in c:
projects[row[0]] = row[1]
c.close()
self.conn.commit()
return projects