开发者

using a mongo script from inside the javascript shell?

开发者 https://www.devze.com 2023-03-19 15:25 出处:网络
I know how to run a mongodb script from the command line and then enter the shell.E.g., mongo --shell dbname dbnameinit.js

I know how to run a mongodb script from the command line and then enter the shell. E.g.,

mongo --shell dbname dbnameinit.js

But once I'm inside the shell, can I开发者_JS百科 execute another script? Anything like db.dbname.load("anotherscript.js")???

Thanks! -- ge


Use: load("anotherscript.js")

0

精彩评论

暂无评论...
验证码 换一张
取 消