comparison idavoll/pgsql_backend.py @ 77:b8958967f508

Introduced date field in items table.
author Ralph Meijer <ralphm@ik.nu>
date Mon, 08 Nov 2004 19:01:20 +0000
parents a63bb34931ec
children ec354aab3949
comparison
equal deleted inserted replaced
76:66fac7cd9edc 77:b8958967f508
77 for item in items: 77 for item in items:
78 self._store_item(cursor, node_id, item, publisher) 78 self._store_item(cursor, node_id, item, publisher)
79 79
80 def _store_item(self, cursor, node_id, item, publisher): 80 def _store_item(self, cursor, node_id, item, publisher):
81 data = item.toXml() 81 data = item.toXml()
82 cursor.execute("""UPDATE items SET publisher=%s, data=%s 82 cursor.execute("""UPDATE items SET date=now(), publisher=%s, data=%s
83 FROM nodes 83 FROM nodes
84 WHERE nodes.id = items.node_id AND 84 WHERE nodes.id = items.node_id AND
85 nodes.node = %s and items.item=%s""", 85 nodes.node = %s and items.item=%s""",
86 (publisher.full().encode('utf8'), 86 (publisher.full().encode('utf8'),
87 data.encode('utf8'), 87 data.encode('utf8'),