changeset 71:a63bb34931ec

Added get_nodes() to Storage.
author Ralph Meijer <ralphm@ik.nu>
date Sun, 07 Nov 2004 14:18:26 +0000
parents 32452ad94430
children a914cad421c5
files idavoll/pgsql_backend.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/idavoll/pgsql_backend.py	Sun Nov 07 14:17:44 2004 +0000
+++ b/idavoll/pgsql_backend.py	Sun Nov 07 14:18:26 2004 +0000
@@ -222,6 +222,11 @@
         self._check_node_exists(cursor, node_id)
         return 'leaf'
 
+    def get_nodes(self):
+        d = self.dbpool.runQuery("""SELECT node from nodes""")
+        d.addCallback(lambda results: [r[0] for r in results])
+        return d
+
 class BackendService(backend.BackendService):
     """ PostgreSQL backend Service for a JEP-0060 pubsub service """