bridge-mongo
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -17,3 +17,13 @@ "use strict"; | ||
project = (proj) => new Aggregate(this.mongoModel, [...this.pipe, { $project: proj }]); | ||
addFields = (proj) => new Aggregate(this.mongoModel, [...this.pipe, { $addFields: proj }]); | ||
addFields = (proj) => { | ||
const realProj = {}; | ||
Object.entries(([key, value]) => { | ||
if (value.$assign) | ||
realProj[key] = value.$assign; | ||
else | ||
realProj[key] = value; | ||
}); | ||
console.log(realProj); | ||
return new Aggregate(this.mongoModel, [...this.pipe, { $addFields: proj }]); | ||
}; | ||
match = (match) => new Aggregate(this.mongoModel, [...this.pipe, { $match: match }]); | ||
@@ -20,0 +30,0 @@ lookup = (lookupParam, aggregateMethod) => { |
{ | ||
"name": "bridge-mongo", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "A mongodb ORM on top of mongoose that match perfectly with the bridgets framework", | ||
@@ -5,0 +5,0 @@ "main": "dist/Lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
77040
973