Thanks to visit codestin.com
Credit goes to github.com

Skip to content

.decrement(...) returns an empty array rather than # of rows affected #330

@elliotf

Description

@elliotf

As we talked about in IRC, decrement is returning an empty array rather than a count of rows affected.

db('a_table')                                         
  .decrement('credits', 1)
  .where('credits', '>=', 1)
  .andWhere('id', 'in', [1,2,3])
  .exec(function(err, result) {
    // result is an empty array rather than a number
  });      

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions