mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 11:02:11 +08:00
[mongoose] add unwind method with new params type
In mongodb 3.2, the unwind operator can with a object params.
This commit is contained in:
@@ -1016,7 +1016,41 @@ aggregate.sort('field -test');
|
||||
aggregate.then(cb).catch(cb);
|
||||
aggregate.unwind("tags").unwind('tags');
|
||||
aggregate.unwind("a", "b", "c").unwind('tag1', 'tag2');
|
||||
|
||||
aggregate.unwind(
|
||||
{
|
||||
path: "tags",
|
||||
includeArrayIndex: "idx",
|
||||
preserveNullAndEmptyArrays: true
|
||||
})
|
||||
.unwind({
|
||||
path: "tags",
|
||||
includeArrayIndex: "idx",
|
||||
preserveNullAndEmptyArrays: true
|
||||
});
|
||||
aggregate.unwind(
|
||||
{
|
||||
path: "a",
|
||||
includeArrayIndex: "idx",
|
||||
preserveNullAndEmptyArrays: true
|
||||
}, {
|
||||
path: "b",
|
||||
includeArrayIndex: "idx",
|
||||
preserveNullAndEmptyArrays: true
|
||||
}, {
|
||||
path: "c",
|
||||
includeArrayIndex: "idx",
|
||||
preserveNullAndEmptyArrays: true
|
||||
})
|
||||
.unwind({
|
||||
path: "tag1",
|
||||
includeArrayIndex: "idx",
|
||||
preserveNullAndEmptyArrays: true
|
||||
}, {
|
||||
path: "tag2",
|
||||
includeArrayIndex: "idx",
|
||||
preserveNullAndEmptyArrays: true
|
||||
});
|
||||
|
||||
/*
|
||||
* section schematype.js
|
||||
* http://mongoosejs.com/docs/api.html#schematype-js
|
||||
|
||||
Reference in New Issue
Block a user