Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
elliotf opened this issue Jun 18, 2014 · 1 comment
Closed

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

elliotf opened this issue Jun 18, 2014 · 1 comment
Labels
bug

Comments

@elliotf
Copy link
Contributor

@elliotf elliotf commented Jun 18, 2014

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
  });      
@elliotf
Copy link
Contributor Author

@elliotf elliotf commented Jun 18, 2014

Fastest. Turnaround. Ever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.