Skip to content

Commit

Permalink
Update README.md (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Whitmer committed Dec 5, 2020
1 parent b76a153 commit 71eb592
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -17,7 +17,7 @@
## Examples

```ts
import { MongoClient } from "https://deno.land/x/mongo@v1.0.0/mod.ts";
import { MongoClient, Bson } from "https://deno.land/x/mongo@v1.0.0/mod.ts";

const client = new MongoClient();
client.connectWithUri("mongodb://localhost:27017");
Expand Down Expand Up @@ -57,7 +57,7 @@ const user1 = await users.findOne({ _id: insertId });
const all_users = await users.find({ username: { $ne: null } });

// find by ObjectId
const user1_id = await users.findOne({ _id: "idxxx" });
const user1_id = await users.findOne({ _id: new Bson.ObjectId("SOME OBJECTID STRING") });

// count
const count = await users.count({ username: { $ne: null } });
Expand Down
1 change: 1 addition & 0 deletions mod.ts
@@ -1,2 +1,3 @@
export { MongoClient } from "./src/client.ts";
export * from "./src/types.ts";
export { Bson } from "./deps.ts";

0 comments on commit 71eb592

Please sign in to comment.