Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 03e43f9

Browse files
Async indexes (#624)
* Minor deps update * Updated package version, api & prepublish script * Added "ensure index async" * Async ensureNoIndex * Added deprecation notice
1 parent b0bf537 commit 03e43f9

File tree

5 files changed

+201
-129
lines changed

5 files changed

+201
-129
lines changed

‎README.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,24 @@ Collection.ensureIndex(selector, options);
4242
4343
Ensures an index exists. Similar to the built-in `createIndex`, but handles the case where the index already exists with different options by removing and re-adding the index with the new options. To ensure your database has the same indexes across different environments, you might want to add `ensureIndex` calls to `Meteor.startup`.
4444
45+
```js
46+
Collection.ensureIndexAsync(selector, options);
47+
```
48+
49+
Similar to `ensureIndex`, but returns a Promise that is resolved when the index is created. This method is compatible with Meteor 3.0.
50+
4551
```js
4652
Collection.ensureNoIndex(selector);
4753
```
4854
4955
The reverse of `ensureIndex`. You might want to call this in `Meteor.startup` to make sure an index has been removed in all of your deployed environments.
5056
57+
```js
58+
Collection.ensureNoIndexAsync(selector);
59+
```
60+
61+
Similar to `ensureNoIndex`, but returns a Promise that is resolved when the index is dropped. This method is compatible with Meteor 3.0.
62+
5163
```js
5264
Collection.aggregate(pipeline, ?options);
5365
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /