viewdb 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23,7 +23,7 @@ var ViewDBTimestampPlugin = function (viewDb) {
|
|
|
23
23
|
doc.changeDateTime = timestamp;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
oldSave.apply(this, arguments);
|
|
26
|
+
return oldSave.apply(this, arguments);
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
var oldInsert = coll.insert;
|
|
@@ -39,7 +39,7 @@ var ViewDBTimestampPlugin = function (viewDb) {
|
|
|
39
39
|
doc.changeDateTime = timestamp;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
oldInsert.apply(this, arguments);
|
|
42
|
+
return oldInsert.apply(this, arguments);
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
var oldFindAndModify = coll.findAndModify;
|
|
@@ -58,7 +58,7 @@ var ViewDBTimestampPlugin = function (viewDb) {
|
|
|
58
58
|
delete set.createDateTime;
|
|
59
59
|
}
|
|
60
60
|
clonedUpdate.$set = set;
|
|
61
|
-
oldFindAndModify.apply(this, [query, sort, clonedUpdate, options, cb]);
|
|
61
|
+
return oldFindAndModify.apply(this, [query, sort, clonedUpdate, options, cb]);
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
var oldUpdateMany = coll.updateMany;
|
|
@@ -77,7 +77,7 @@ var ViewDBTimestampPlugin = function (viewDb) {
|
|
|
77
77
|
delete set.createDateTime;
|
|
78
78
|
}
|
|
79
79
|
clonedUpdate.$set = set;
|
|
80
|
-
oldUpdateMany.apply(this, [query, clonedUpdate, options, cb]);
|
|
80
|
+
return oldUpdateMany.apply(this, [query, clonedUpdate, options, cb]);
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
var oldUpdateOne = coll.updateOne;
|
|
@@ -96,7 +96,7 @@ var ViewDBTimestampPlugin = function (viewDb) {
|
|
|
96
96
|
delete set.createDateTime;
|
|
97
97
|
}
|
|
98
98
|
clonedUpdate.$set = set;
|
|
99
|
-
oldUpdateOne.apply(this, [query, clonedUpdate, options, cb]);
|
|
99
|
+
return oldUpdateOne.apply(this, [query, clonedUpdate, options, cb]);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
return coll;
|
|
@@ -19,7 +19,7 @@ var ViewDBVersioningPlugin = function (viewDb) {
|
|
|
19
19
|
doc.version = _getVersion(doc.version);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
oldSave.apply(this, arguments);
|
|
22
|
+
return oldSave.apply(this, arguments);
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
var oldInsert = coll.insert;
|
|
@@ -33,7 +33,7 @@ var ViewDBVersioningPlugin = function (viewDb) {
|
|
|
33
33
|
doc.version = _getVersion(doc.version);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
oldInsert.apply(this, arguments);
|
|
36
|
+
return oldInsert.apply(this, arguments);
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
var oldFindAndModify = coll.findAndModify;
|
|
@@ -46,7 +46,7 @@ var ViewDBVersioningPlugin = function (viewDb) {
|
|
|
46
46
|
delete update.$set.version;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
oldFindAndModify.apply(this, arguments);
|
|
49
|
+
return oldFindAndModify.apply(this, arguments);
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
var oldUpdateMany = coll.updateMany;
|
|
@@ -59,7 +59,7 @@ var ViewDBVersioningPlugin = function (viewDb) {
|
|
|
59
59
|
delete update.$set.version;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
oldUpdateMany.apply(this, arguments);
|
|
62
|
+
return oldUpdateMany.apply(this, arguments);
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
var oldUpdateOne = coll.updateOne;
|
|
@@ -72,7 +72,7 @@ var ViewDBVersioningPlugin = function (viewDb) {
|
|
|
72
72
|
delete update.$set.version;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
oldUpdateOne.apply(this, arguments);
|
|
75
|
+
return oldUpdateOne.apply(this, arguments);
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
return coll;
|