Skip to content

Inconsistent function of the update functionality #24

@Strainy

Description

@Strainy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions