码迷,mamicode.com
首页 > 数据库 > 详细

【MongoDB】The description of procedure in MongoDB

时间:2017-07-09 20:41:32      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:java   nts   desc   jsb   tail   script   mysq   class   技术   

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;





【MongoDB】The description of procedure in MongoDB

标签:java   nts   desc   jsb   tail   script   mysq   class   技术   

原文地址:http://www.cnblogs.com/wzzkaifa/p/7142503.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!