changeset 66:13ced084aa69

Add get_node_type() to Storage.
author Ralph Meijer <ralphm@ik.nu>
date Sat, 06 Nov 2004 22:16:04 +0000
parents d617f8d19263
children cdf17c4d3bf9
files idavoll/pgsql_backend.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
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 """