mark一下
参考:
https : / / blog . csdn . net/laoyang360/article/details/72594344
参考:
https : / / blog . csdn . net/laoyang360/article/details/72594344
1.str转long
- 当int很长时
- db.teststatement.find({"ctime":{$type: 2}}).forEach( function (x) {
- x.ctime= NumberLong (x.ctime);
- db.teststatement.save(x);
- })
2.int转str
- db.redefine_share_backwards.find( { 'share_uid' : { $gte : 0 } } ).forEach( function (x) {
- x.share_uid = ""+x.share_uid;
- db.redefine_share_backwards.save(x);
- })
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29096438/viewspace-2155859/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29096438/viewspace-2155859/