https://github.com/rickharrison/co-sqlbox
sqlbox enhancements for generators with co
https://github.com/rickharrison/co-sqlbox
Last synced: about 1 month ago
JSON representation
sqlbox enhancements for generators with co
- Host: GitHub
- URL: https://github.com/rickharrison/co-sqlbox
- Owner: rickharrison
- License: mit
- Created: 2014-03-01T03:50:35.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-01T04:00:25.000Z (over 12 years ago)
- Last Synced: 2025-10-20T12:53:23.121Z (9 months ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# co-sqlbox
[sqlbox](https://github.com/raycmorgan/sqlbox) enhancements for generators with co
## Installation
```
$ npm install co-sqlbox
```
## Setup
Simply require co-sqlbox and use the same as [sqlbox](https://github.com/raycmorgan/sqlbox).
## Additions
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.
## Example
```
var savedUser = yield UserModel.saveThunk({ email: 'foo@bar.com' });
```
## License
MIT