6. 存储类型: BSON
BSON documents (objects) consist of a well ordered list of elements. Each
element consists of a field name, a type, and a value. Field names are strings.
Types include:
* string
* integer
* double
* date
* byte array (binary data)
* boolean (true and false)
* null
* BSON object
This is nominally a superset of JSON types (JSON does not have a byte array
type, for example), but because of length limitations, some valid JSON values
(such as very long strings) are not valid BSON values.
13. Cursor Stages
A MongoCursor has two "life stages": pre- and post-
query. When a cursor is created, it has not yet contacted
the database, so it is in its pre-query state. In this state,
the client can further specify what they want the query
to do, including adding limits, skips, sorts, and more
advanced options.
When the client attempts to get a result (by calling
MongoCursor::next(), directly or indirectly), the cursor
moves into the post-query stage. At this point, the
query has been executed by the database and cannot be
modified anymore.