server/sources/native.py
changeset 9605 e6b8931abe17
parent 9585 3f5b59527d31
child 9611 ca853478aaa8
equal deleted inserted replaced
9604:eba0e1b033ab 9605:e6b8931abe17
  1003                 sql += ' WHERE %s' % ' OR '.join(subqsqls)
  1003                 sql += ' WHERE %s' % ' OR '.join(subqsqls)
  1004             restr.update(trarestr)
  1004             restr.update(trarestr)
  1005             restr.update(tearestr)
  1005             restr.update(tearestr)
  1006         # we want results ordered by transaction's time descendant
  1006         # we want results ordered by transaction's time descendant
  1007         sql += ' ORDER BY tx_time DESC'
  1007         sql += ' ORDER BY tx_time DESC'
  1008         cu = self.doexec(session, sql, restr)
  1008         with session.ensure_cnx_set:
  1009         # turn results into transaction objects
  1009             cu = self.doexec(session, sql, restr)
  1010         return [tx.Transaction(*args) for args in cu.fetchall()]
  1010             # turn results into transaction objects
       
  1011             return [tx.Transaction(*args) for args in cu.fetchall()]
  1011 
  1012 
  1012     def tx_info(self, session, txuuid):
  1013     def tx_info(self, session, txuuid):
  1013         """See :class:`cubicweb.repoapi.ClientConnection.transaction_info`"""
  1014         """See :class:`cubicweb.repoapi.ClientConnection.transaction_info`"""
  1014         return tx.Transaction(txuuid, *self._tx_info(session, txuuid))
  1015         return tx.Transaction(txuuid, *self._tx_info(session, txuuid))
  1015 
  1016