def commit (self):
     sql = """update txn set bbox = envelope(collect(shape)) from history
                 where history.txn_id = txn.uuid and txn.uuid = '%s'""" \
                 % self.txn_uuid
     cursor = self.db.cursor()
     cursor.execute(str(sql))
     PostGIS.commit(self)
 def begin (self):
     PostGIS.begin(self)
     self.txn_uuid = uuid.uuid1().hex
     sql = """INSERT INTO txn (uuid, actor, message, commit_time)
                     VALUES ('%s', 1, 'message', now());""" % self.txn_uuid
     cursor = self.db.cursor()
     cursor.execute(str(sql))