def _getTransactionCounter(self, field):
        """Get transaction counter
        Return (Boolean, value) with boolean being True if the counter was
        found in the table"""
        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 __HOLE__:
            return False, 0

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

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