Closed glsignal closed 9 years ago
I've made use of this behaviour in the vanilla IndexedDB interface and found it very useful.
When creating/updating records on an object store using IDBObjectStore.put, the onsuccess event handler will be passed the record's key as result:
IDBObjectStore.put
onsuccess
objectStore.put(record).onsuccess = function(evt) { console.log(evt.target.result); // record's key };
It would be helpful, for myself at least, if treo implemented this behaviour perhaps something like this:
treoStore.put(record, function(key) { console.log(key); // record's key });
What are your thoughts?
Agreed that it's useful. Especially with autoIncrement, will be implemented in 0.4.0
autoIncrement
:+1: Excellent :)
I've made use of this behaviour in the vanilla IndexedDB interface and found it very useful.
When creating/updating records on an object store using
IDBObjectStore.put
, theonsuccess
event handler will be passed the record's key as result:It would be helpful, for myself at least, if treo implemented this behaviour perhaps something like this:
What are your thoughts?