react-native-db-models
react-native-db-models copied to clipboard
Inconsistent function of the update functionality
Great work on this wrapper. It's really useful!
I just noticed a small issue today. It seems that when receiving the callback from the update
or the update_id
function I get the entire database returned rather than just the updated record.
So for example, this code:
var _CacheIndex = new RNDBModel.create_db("testCache");
// create some data...
this._CacheIndex.update({key}, {key, value, expiry}, (data) => {
console.log(data);
}
Will print out the following object to the logs:
Object
testCache: Object
autoinc: 24
rows: Object
totalrows: 1
I'd expect it to just return the row I submitted, similar to how the add
and remove
callbacks function.