发布于 2015-09-14 14:53:01 | 257 次阅读 | 评论: 0 | 来源: 网络整理
db.loadServerScripts() loads all scripts in the system.js collection for the current database into the mongo shell session.
Documents in the system.js collection have the following prototype form:
{ _id : "<name>" , value : <function> } }
The documents in the system.js collection provide functions that your applications can use in any JavaScript context with MongoDB in this database. These contexts include $where clauses and mapReduce operations.