Code

session API consistency
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 12 Jul 2010 04:11:05 +0000 (04:11 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 12 Jul 2010 04:11:05 +0000 (04:11 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4496 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/backends/sessions_rdbms.py

index c5dc1893624497d199ec2ecaecdee04871c46a5b..d607f477ce3c3585450cff0bc5f9b1a07f4a6400 100644 (file)
@@ -72,6 +72,12 @@ class BasicDatabase:
             args = (infoid, time.time(), repr(values))
         c.execute(sql, args)
 
+    def list(self):
+        c = self.cursor
+        n = self.name
+        c.execute('select %s_key from %ss'%(n, n))
+        return [res[0] for res in c.fetchall()]
+
     def destroy(self, infoid):
         self.cursor.execute('delete from %ss where %s_key=%s'%(self.name,
             self.name, self.db.arg), (infoid,))