Skip to content

Commit

Permalink
examples
Browse files Browse the repository at this point in the history
  • Loading branch information
cdimascio committed Jan 2, 2022
1 parent aed7374 commit 934a0a4
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/ex1-mongodb.js β†’ examples/ex1-mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ MongoClient.connect(url, { useNewUrlParser: true }, async (err, client) => {
const collection = await db.createCollection(collectionName);

// *****
// 1. insert a record with a v1 uuid
// 1. insert a record with a v1 uuid
const insertResult = await collection.insertOne({
_id: MUUID.v1(),
name: 'carmine',
});

// retrieve the newly inserted document's UUID
// retrieve the newly inserted document's UUID
// and print it as a human readable string
const insertedId = MUUID.from(insertResult.insertedId).toString();
console.log(`insertOne with id ${insertedId} succeeded`);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 934a0a4

Please sign in to comment.