I'm using YDN-DB as my indexeddb wrapper; I've read the user guide and api, and have absolutely no idea how you'd update a record by id (primary key [auto incremented]).
Is anyone familiar with this/have any idea?
Figured it out (finally) - thanks for the great library Kyaw!
The following code works:
record = {id: 1, "setting": "test", "value": "value"};
req = db.put({name: 'tblSettings', keyPath: 'id'}, record);
req.done(function(key) {
console.log(key);
});
req.fail(function(e) {
throw e;
});