MongoDB 字段名称中不允许使用哪些字符? [英] What characters are NOT allowed in MongoDB field names?

查看:36
本文介绍了MongoDB 字段名称中不允许使用哪些字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当然明白了.和 SPACE 是不允许的.还有其他禁止字符吗?

I figured out that of course . and SPACE aren't allowed. Are there other forbidden characters ?

推荐答案

您可以在字段名称中使用任何 (UTF8) 字符特殊(包含.",或以$"开头).

You can use any (UTF8) character in the field name which aren't special (contains ".", or starts with "$").

https://jira.mongodb.org/browse/SERVER-3229

https://stackoverflow.com/a/7976235/311220

通常最好坚持使用带下划线的小写字母数字.

It's generally best to stick with lowercase alphanumeric with underscores though.

这篇关于MongoDB 字段名称中不允许使用哪些字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆