【问题详细描述】
如何查看表字段的数据类型?
【解决方法】
1、可以使用“操作符 -> 函数操作 -> $type”函数查看字段的数据类型,比如:作为选择符使用,返回字段“a”值的数据类型:
db.foo.bar.find( {}, { "a": { "$type": 2 } } )
$type 参考: http://doc.sequoiadb.com/cn/SequoiaDB-cat_id-1477878020-edition_id-302
2、注意从v2.8开始$type已经改为函数操作,不再做为匹配符使用。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/69935160/viewspace-2649794/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/69935160/viewspace-2649794/