comparison 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
comparison
equal deleted inserted replaced
65:d617f8d19263 66:13ced084aa69
213 213
214 def _convert_subscription_jids(self, subscriptions): 214 def _convert_subscription_jids(self, subscriptions):
215 return [(node, jid.JID('%s/%s' % (subscriber, resource)), subscription) 215 return [(node, jid.JID('%s/%s' % (subscriber, resource)), subscription)
216 for node, subscriber, resource, subscription in subscriptions] 216 for node, subscriber, resource, subscription in subscriptions]
217 217
218 def get_node_type(self, node_id):
219 return self.dbpool.runInteraction(self._get_node_type, node_id)
220
221 def _get_node_type(self, cursor, node_id):
222 self._check_node_exists(cursor, node_id)
223 return 'leaf'
224
218 class BackendService(backend.BackendService): 225 class BackendService(backend.BackendService):
219 """ PostgreSQL backend Service for a JEP-0060 pubsub service """ 226 """ PostgreSQL backend Service for a JEP-0060 pubsub service """
220 227
221 class NodeCreationService(backend.NodeCreationService): 228 class NodeCreationService(backend.NodeCreationService):
222 pass 229 pass