Ivshti / linvodb3

Persistent database for Node.js/NW.js/Electron with MongoDB/Mongoose-like features and interface on top of LevelUp
MIT License
747 stars 71 forks source link

Does updateAsync possible with bluebird? #103

Open serzhiio opened 6 years ago

serzhiio commented 6 years ago

hi gyus faced with problem... Bluebird does perfectly all with find and exec! But i cant recieve Promise from update and insert, is it possible?

poria-cat commented 6 years ago

@serzhiio well, you can write code like :

const insert = bluebird.promisify(Model.insert, {context: Model})
insert({xx:xxx}).then(...).catch(...)