def METHOD_NAME(self, q, key):
    count = 0
    c = self.connection.cursor()
    for row in c.execute("SELECT * FROM ua WHERE complete=? AND key=?",
                         (0, key)):
        o = pickle.loads(row['object'])
        q.put(o)
        count += 1
    c.close()
    return count