bridge-mongo
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -19,2 +19,3 @@ import { convertDBSchemasToDBI } from '../types'; | ||
unwind: AggI<SchemasI, ModelName>['unwind']; | ||
countPipe: AggI<SchemasI, ModelName>['countPipe']; | ||
lookup: AggI<SchemasI, ModelName>['lookup']; | ||
@@ -21,0 +22,0 @@ /** |
@@ -24,2 +24,3 @@ "use strict"; | ||
unwind = (unwind) => new Aggregate(this.mongoModel, [...this.pipe, { $unwind: unwind }]); | ||
countPipe = (key) => new Aggregate(this.mongoModel, [...this.pipe, { $count: key }]); | ||
lookup = (lookupQuery, subAggregate) => { | ||
@@ -26,0 +27,0 @@ if ('localField' in lookupQuery) { |
@@ -43,2 +43,3 @@ import { convertDBSchemasToDBI, Projection, ApplyProj, MatchQuery, SortQuery } from '../types'; | ||
}>>; | ||
countPipe: <CountKey extends string>(key: CountKey) => Record<CountKey, number>; | ||
exec: () => Promise<ModelI[]>; | ||
@@ -45,0 +46,0 @@ paginate: (skip: number, limit: number) => Promise<{ |
{ | ||
"name": "bridge-mongo", | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"description": "A mongodb ORM on top of mongoose that match perfectly with the Bridge framework", | ||
@@ -5,0 +5,0 @@ "main": "dist/source/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
66917
833