You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function in question _run is not a part of db-migrate, it is internal function called by db-migrate-mongodb.
As for the usage as far I understand it should not be called directly, with the exception of accessing getDbInstance or other commands like remove, to get full command list see the definition of _run method in index.js.
@rymut exactly, _ functions are by definition in all nodejs apps including the core of node "private", or not intended to be used. That doesn't mean you can't use them, but you have no support for it and there will be never a documentation of those except for code docs.
So short, no support, use it on your own risk don't complain should it break without notice or major version bump in the future and finally, be prepared to walk on your own, since you will need to figure out those functions functionality and way of working yourself.
exports.up=function(db){returndb._run("update","collectionToUpdate",{query: {id: "1123"},// What you need to findupdate: {title: "myNewTitle",desc: "It works"},// What you need to changeoptions: {},// Options like e.g: upsert: false,});};
_run function (see below) is not documented (https://db-migrate.readthedocs.io/en/latest/API/programable/#run)
/**
*/
_run: function(command, collection, options, callback) {
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: