|
@@ -63,6 +63,21 @@ rationChapterTreeDAO.prototype.tempRationChapterTreeInsert = function(repository
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+rationChapterTreeDAO.prototype.updateNodes = function(nodes,callback){
|
|
|
+ var functions = [];
|
|
|
+ for (var i=0; i < nodes.length; i++) {
|
|
|
+ functions.push((function(doc) {
|
|
|
+ return function(cb) {
|
|
|
+ doc.save(cb);
|
|
|
+ };
|
|
|
+ })(nodes[i]));
|
|
|
+ }
|
|
|
+ async.parallel(functions, function(err, results) {
|
|
|
+ //console.log(err);
|
|
|
+ //console.log(results);
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
rationChapterTreeDAO.prototype.sectionUpsert = function(repositoryName,section,callback){
|
|
|
var db = dbm.getCfgConnection(repositoryName);
|
|
|
var rationChapterTreeModel = db.model("rationChapterTrees",rationChapterTreeSchema, "rationChapterTrees");
|