发表于: redis/memcached/mongo | 作者: | 日期: 2013/12/24 09:12

三天不敲这些命令基本上就忘光了,还是得记录一下。
查看存储过程

db.system.js.distinct(“_id”);

保存存储过程

db.system.js.insert({
“_id” : “myFunction”,
“value” : function(arg1, arg2) {
print(“………………….”);
print(“———打印参数begin{ ———–“);
print(“arg1 –> ” + arg1);
print(“arg2 –> ” + arg2);
print(“———打印参数 end }———–“);
}
);

删除存储过程

db.system.js.remove({
_id : “myFunction”
})

调用存储过程

db.eval(“myFunction(‘1’, ‘SD’);”)

: https://blog.darkmi.com/2013/12/24/1511.html

本文相关评论 - 1条评论都没有呢
Post a comment now » 本文目前不可评论

No comments yet.

Sorry, the comment form is closed at this time.