The judgment of IndexedDB to update data and add data

Business scenario:
AJAX returns the data res after sending the request, and the returned data is dynamic (maybe a lot, maybe very little). Maybe some need to be updated and some need to be added)
I want to implement a judgment to determine whether the ID is repeated or not, but because the IndexedDB .put (update) .add (add) is executed separately, it is not so powerful and intelligent, and the data of my AJAX may need to be added or updated in a JSON. So some people are at a loss and hope that the god can give some advice

success: function(res) {
    // 
    initDb();
    var users = JSON.parse(res);
    var tx = db.transaction("users", READ_WRITE);
    var store = tx.objectStore("users");
    var i = 0, len = users.length;
    while(i < len){
     var req= store.add(users[iPP]);
     req.onsuccess = function (evt) {
     console.debug("addData success:", evt.target.result);
     };
     req.onerror = function (evt) {
         // 
         //ID,
         //JS()
     };
    };
   };                                

answer your own questions. It seems that IndexedDB is too small. Few people use it.
is a semi-solution. Just use the .put method because I happened to see it on the document. If there is no put method, it will increase itself. So just put directly

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e436e1-44a41.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e436e1-44a41.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?