diff idavoll/pgsql_backend.py @ 66:13ced084aa69

Add get_node_type() to Storage.
author Ralph Meijer <ralphm@ik.nu>
date Sat, 06 Nov 2004 22:16:04 +0000
parents 8cdbc27c467a
children a63bb34931ec
line wrap: on
line diff
--- a/idavoll/pgsql_backend.py	Sat Nov 06 22:15:26 2004 +0000
+++ b/idavoll/pgsql_backend.py	Sat Nov 06 22:16:04 2004 +0000
@@ -215,6 +215,13 @@
         return [(node, jid.JID('%s/%s' % (subscriber, resource)), subscription)
                 for node, subscriber, resource, subscription in subscriptions]
 
+    def get_node_type(self, node_id):
+        return self.dbpool.runInteraction(self._get_node_type, node_id)
+    
+    def _get_node_type(self, cursor, node_id):
+        self._check_node_exists(cursor, node_id)
+        return 'leaf'
+
 class BackendService(backend.BackendService):
     """ PostgreSQL backend Service for a JEP-0060 pubsub service """