How to use the UUID function from bson
Find comprehensive JavaScript bson.UUID code examples handpicked from public code repositorys.
GitHub: mongodb/docs-node
48 49 50 51 52 53 54 55 56
.. code-block:: javascript const { UUID } = require('bson'); ... const client = new MongoClient(uri, { pkFactory: { createPk: () => new UUID().toBinary() } }); .. note:: Data Consistency
32
8
19
bson.ObjectId is the most popular function in bson (1017 examples)