def _getTransactionCounter(self, field):
        if 'DatabaseAttributes' not in self.db.tables:
            # We should already have converted the schema to have the table in
            # place. This may mean an update code path run with --info as
            # non-root (or owner of the schema)
            # incrementTransactionCounter should fail though.
            return False, 0

        cu = self.db.cursor()
        cu.execute("SELECT value FROM DatabaseAttributes WHERE name = ?",
                   field)
        try:
            row = cu.next()
            counter = row[0]
        except StopIteration:
            return False, 0

        try:
            counter = int(counter)
        except ValueError:
            return True, 0

        return True, counter
Get transaction counter
dataset/ETHPy150Open sassoftware/conary/conary/local/sqldb.py/Database._getTransactionCounter