Loading

MongoDB 数据类型

MongoDB 将 json 格式的字符串转化为 bson 格式的数据进行存储,目的是节省存储空间,但同时不会改变json的样式。
BSON is a binary serialization format used to store documents and make remote procedure calls in MongoDB.
BSON是一种二进制串行格式,这种格式在MongoDB中被存储为文档和让远程的程序调用。

一、BSON Types#

Each BSON type has both integer and string identifiers as listed in the following table:

序号 类型 别名 备注
1 Double "double"
2 String "string"
3 Object "object"
4 Array "array"
5 Binary data "binData"
6 ObjectId "objectId"
7 Boolean "bool"
8 Date "date"
9 Null "null"
10 Regular Expression "regex"
11 JavaScript "javascript"
12 32-bit integer "int"
13 64-bit integer "long"
14 Timestamp "timestamp"
15 Decimal128 "decimal"
16 Min key "minKey"
17 Max key "maxKey"

二、参考来源#

BSON Types

作者:caojun97

出处:https://www.cnblogs.com/caojun97/p/16981460.html

版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。

posted @   eiSouthBoy  阅读(103)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
点击右上角即可分享
微信分享提示
more_horiz
keyboard_arrow_up dark_mode palette
选择主题
menu