From 44c9cb545a47b9a2fc9c10e340ece89137ecbdc5 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Thu, 16 Jul 2020 02:43:06 +0200 Subject: [PATCH] Bump to v0.9.1 (#79) Update version --- README.md | 12 +++++------- mod.ts | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0fe1b3ff..360b9de0 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ deno run --allow-net --allow-write --allow-read --allow-plugin --unstable xxx.ts ## Examples ```ts -import { MongoClient } from "https://deno.land/x/mongo@v0.8.0/mod.ts"; +import { MongoClient } from "https://deno.land/x/mongo@v0.9.1/mod.ts"; const client = new MongoClient(); client.connectWithUri("mongodb://localhost:27017"); @@ -35,7 +35,7 @@ interface UserSchema { _id: { $oid: string }; username: string; password: string; -}; +} const db = client.database("test"); const users = db.collection("users"); @@ -67,9 +67,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: { "$oid": "" } }, -); +const user1_id = await users.findOne({ _id: { $oid: "" } }); // count const count = await users.count({ username: { $ne: null } }); @@ -83,13 +81,13 @@ const docs = await users.aggregate([ // updateOne const { matchedCount, modifiedCount, upsertedId } = await users.updateOne( { username: { $ne: null } }, - { $set: { username: "USERNAME" } }, + { $set: { username: "USERNAME" } } ); // updateMany const { matchedCount, modifiedCount, upsertedId } = await users.updateMany( { username: { $ne: null } }, - { $set: { username: "USERNAME" } }, + { $set: { username: "USERNAME" } } ); // deleteOne diff --git a/mod.ts b/mod.ts index 89ca1548..6e2dfa99 100644 --- a/mod.ts +++ b/mod.ts @@ -6,7 +6,7 @@ export * from "./ts/database.ts"; export * from "./ts/result.ts"; export { ObjectId, UpdateOptions } from "./ts/types.ts"; export * from "./ts/util.ts"; -export const VERSION = "v0.8.0"; +export const VERSION = "v0.9.1"; export const RELEASE_URL = `https://github.com/manyuanrong/deno_mongo/releases/download/${VERSION}`;