admin管理员组文章数量:1130349
当mongo collection的名字当中存在特殊字符时,在shell中对改集合进行操作会报SyntaxError: identifier starts immediately after numeric literal的错误。
解决办法:getCollection函数将collection name转换一下即可
例:
order_cluster:PRIMARY> db.getCollection("order_2017-08").find().count()
12991689
有些工具已经对此做出相应处理,如:MongoChef
注意选择value的数据类型
转载于:https://wwwblogs/geek-ace/p/7374615.html
当mongo collection的名字当中存在特殊字符时,在shell中对改集合进行操作会报SyntaxError: identifier starts immediately after numeric literal的错误。
解决办法:getCollection函数将collection name转换一下即可
例:
order_cluster:PRIMARY> db.getCollection("order_2017-08").find().count()
12991689
有些工具已经对此做出相应处理,如:MongoChef
注意选择value的数据类型
转载于:https://wwwblogs/geek-ace/p/7374615.html
本文标签: SyntaxErroridentifiermongoCollectionnumeric
版权声明:本文标题:mongo collection name—SyntaxError: identifier starts immediately after numeric literal 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1754577276a2703719.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论