co-sqlbox

sqlbox enhancements for generators with co

co-sqlbox

sqlbox enhancements for generators with co

$ npm install co-sqlbox

Simply require co-sqlbox and use the same as sqlbox.

A number of methods have been added to sqlbox models that will return a thunk. These methods are the following:

  • getThunk
  • mgetThunk
  • saveThunk
  • removeThunk
  • modifyThunk
  • firstThunk
  • allThunk
  • queryThunk

They function exactly the same as their counterparts except that they return a thunk instead of accepting a standard callback.

var savedUser = yield UserModel.saveThunk({ email: 'foo@bar.com' });

MIT