简介

予早 2026-04-30 23:53:28
Categories: Tags:

https://www.mongodb.com/

文档

https://www.mongodb.com/docs/manual/

Getting Started — MongoDB Manual

数据类型,BSON

ObjectID 长度为 12 字节,由几个 2-4 字节的链组成。每个链代表并指定文档身份的具体内容。以下的值构成了完整的 12 字节组合:

保证不同时间不同机器不同进程必然唯一

时间日期


new Date()

new Date("<YYYY-mm-dd>") returns the ISODate with the specified date.

new Date("<YYYY-mm-ddTHH:MM:ss>") specifies the datetime in the client's local timezone and returns the ISODate with the specified datetime in UTC.

new Date("<YYYY-mm-ddTHH:MM:ssZ>") specifies the datetime in UTC and returns the ISODate with the specified datetime in UTC.

new Date(<integer>) specifies the datetime as milliseconds since the UNIX epoch (Jan 1, 1970), and returns the resulting ISODate instance.

mongodb限制和阈值,见官方文档

BSON文档

BSON Document Size

BSON文档的最大大小为16 MB。最大文档大小有助于确保单个文档不会使用过多的RAM或在传输过程中占用过多的带宽。要存储大于最大大小的文档,MongoDB提供了GridFS API

Nested Depth for BSON Documents

MongoDB支持BSON文档嵌套的级别不超过100

服务器参数,见官方文档

系统变量使用$$引用