【MongoDB】The description of procedure in MongoDB

In this blog the procedure of mongodb will be described in details. It is known that mongodb has provided a series of efficient solution to some different questions, such as high performance, changeable type and so on. Compared with the mysql database, the mongodb also support the procedure process. The first thing that you should know about procedure is the language, javascript. In the next time, I will set an example to describe this question:




In the above example, the command ‘db.eval()’ must be attached importance because of its strange feature. We could write the logic into this method and meanwhile call it without declaring the procedure process before calling.



In the above exmple, one question should be cared about. When you use procedure process, you should define the procedure in the database where you want to use procedure;





郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。