输入banner图图片脚本导航/分类

MongoDB 自己定义函数

  • 定义
    db.system.js.insert({
            _id : "TestConcat", 
          value : function TestConcat(s1, s2){
                       return s1 + s2
                  }
       });
  • 执行
    db.eval('TestConcat("abc","123")');
  • 结果
    abc123

MongoDB 自己定义函数

标签:test   自己   file   pre   name   turn   mon   class   script