From 06951743b5218b336df30cf7956a3e0458665d71 Mon Sep 17 00:00:00 2001
From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com>
Date: Wed, 31 Aug 2022 09:26:20 -0300
Subject: [PATCH 1/3] chore: added how can I use section to change log
---
guide/source/2.8-migration.md | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/guide/source/2.8-migration.md b/guide/source/2.8-migration.md
index ae66e3c94d..8dbb57a385 100644
--- a/guide/source/2.8-migration.md
+++ b/guide/source/2.8-migration.md
@@ -37,6 +37,33 @@ Here are the newly added methods (you can see this description and the code [her
for await (const document of collection.find(query, options)) /* ... */
```
+
How can I start using this new features?
+
+We got a few examples for making it easy to use this new feature, you can look the code snippet bellow
+
+```js
+// Before 2.8, we would use something like this
+export const removeByID = ({ id }) => {
+ SomeCollection.remove(id);
+};
+
+// Now we can also do like this
+export const removeByIDAsync = async ({ id }) => {
+ await SomeCollection.removeAsync({ _id: id });
+};
+
+Meteor.methods({
+ //...
+ removeByID,
+ removeByIDAsync,
+});
+
+// In UI use Meteor.call('removeByID', { id }) or Meteor.call('removeByIDAsync', { id })
+```
+
+More examples can be retrieved from [this commit](https://github.com/fredmaiaarantes/simpletasks/compare/main...mongodb-async-api).
+
+
Can I update to this version without changing my app?
Yes. You can update to this version without changing your app.
From 6be0b2079b47e8b667fd1617e8853c50115975b8 Mon Sep 17 00:00:00 2001
From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com>
Date: Wed, 31 Aug 2022 09:30:46 -0300
Subject: [PATCH 2/3] fix: grammar errors
---
guide/source/2.8-migration.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/guide/source/2.8-migration.md b/guide/source/2.8-migration.md
index 8dbb57a385..d695fe3f4f 100644
--- a/guide/source/2.8-migration.md
+++ b/guide/source/2.8-migration.md
@@ -37,9 +37,9 @@ Here are the newly added methods (you can see this description and the code [her
for await (const document of collection.find(query, options)) /* ... */
```
-How can I start using this new features?
+How can I start using these new features?
-We got a few examples for making it easy to use this new feature, you can look the code snippet bellow
+We got a few examples for making it easy to use these new feature, you can look the code snippet bellow
```js
// Before 2.8, we would use something like this
From 594e185c092cfde0539e4d5bb2fad9abbb6309f0 Mon Sep 17 00:00:00 2001
From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com>
Date: Wed, 31 Aug 2022 11:56:44 -0300
Subject: [PATCH 3/3] chore: adressed comments
---
guide/source/2.8-migration.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/guide/source/2.8-migration.md b/guide/source/2.8-migration.md
index d695fe3f4f..fb53d34817 100644
--- a/guide/source/2.8-migration.md
+++ b/guide/source/2.8-migration.md
@@ -44,7 +44,7 @@ We got a few examples for making it easy to use these new feature, you can look
```js
// Before 2.8, we would use something like this
export const removeByID = ({ id }) => {
- SomeCollection.remove(id);
+ SomeCollection.remove({ _id: id });
};
// Now we can also do like this