- Reference >
mongo
Shell Methods >- Database Methods >
- db.loadServerScripts()
db.loadServerScripts()¶
-
db.
loadServerScripts
()¶ db.loadServerScripts()
loads all scripts in thesystem.js
collection for the current database into themongo
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 andmapReduce
operations.