Skip to content

Commit 678226f

Browse files
author
Richard Jones
committed
session API consistency
1 parent 6fcac5d commit 678226f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

roundup/backends/sessions_rdbms.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ def set(self, infoid, **newvalues):
7272
args = (infoid, time.time(), repr(values))
7373
c.execute(sql, args)
7474

75+
def list(self):
76+
c = self.cursor
77+
n = self.name
78+
c.execute('select %s_key from %ss'%(n, n))
79+
return [res[0] for res in c.fetchall()]
80+
7581
def destroy(self, infoid):
7682
self.cursor.execute('delete from %ss where %s_key=%s'%(self.name,
7783
self.name, self.db.arg), (infoid,))

0 commit comments

Comments
 (0)