【问题详细描述】
如何查看表字段的数据类型? 函数
【解决方法】
一、能够使用“操做符 -> 函数操做 -> $type”函数查看字段的数据类型,好比:做为选择符使用,返回字段“a”值的数据类型:code
db.foo.bar.find( {}, { "a": { "$type": 2 } } ) $type 参考: http://doc.sequoiadb.com/cn/SequoiaDB-cat_id-1477878020-edition_id-302
二、注意从v2.8开始$type已经改成函数操做,再也不作为匹配符使用。it