From: richard Date: Mon, 12 Jul 2010 04:11:05 +0000 (+0000) Subject: session API consistency X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f15ced14834173829ce93f0bbdb5ec2b585bd1b2;p=roundup.git session API consistency git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4496 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/backends/sessions_rdbms.py b/roundup/backends/sessions_rdbms.py index c5dc189..d607f47 100644 --- a/roundup/backends/sessions_rdbms.py +++ b/roundup/backends/sessions_rdbms.py @@ -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,))