mongoplusplus 1.0.1 → 1.0.2
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.
- package/mongoplus.js +4 -4
- package/package.json +28 -25
package/mongoplus.js
CHANGED
|
@@ -188,7 +188,7 @@ class MongoModel {
|
|
|
188
188
|
|
|
189
189
|
async findOne(dbIndex, filter, chain = {}) {
|
|
190
190
|
var currentModel = this.model[dbIndex]
|
|
191
|
-
|
|
191
|
+
|
|
192
192
|
if (chain.skip && chain.limit && chain.sort) {
|
|
193
193
|
currentModel.findOne(filter).skip(chain.skip).limit(chain.limit).sort(chain.sort)
|
|
194
194
|
} else if (chain.skip && chain.limit) {
|
|
@@ -211,7 +211,7 @@ class MongoModel {
|
|
|
211
211
|
|
|
212
212
|
async find(dbIndex, filter, chain = {}) {
|
|
213
213
|
var currentModel = this.model[dbIndex]
|
|
214
|
-
|
|
214
|
+
|
|
215
215
|
if (chain.skip && chain.limit && chain.sort) {
|
|
216
216
|
currentModel.find(filter).skip(chain.skip).limit(chain.limit).sort(chain.sort)
|
|
217
217
|
} else if (chain.skip && chain.limit) {
|
|
@@ -232,7 +232,7 @@ class MongoModel {
|
|
|
232
232
|
//=======================
|
|
233
233
|
async findById(dbIndex, filter, chain = {}) {
|
|
234
234
|
var currentModel = this.model[dbIndex]
|
|
235
|
-
|
|
235
|
+
|
|
236
236
|
if (chain.skip && chain.limit && chain.sort) {
|
|
237
237
|
currentModel.findById(filter).skip(chain.skip).limit(chain.limit).sort(chain.sort)
|
|
238
238
|
} else if (chain.skip && chain.limit) {
|
|
@@ -254,7 +254,7 @@ class MongoModel {
|
|
|
254
254
|
//==========================
|
|
255
255
|
async findById(dbIndex, filter, chain = {}) {
|
|
256
256
|
var currentModel = this.model[dbIndex]
|
|
257
|
-
|
|
257
|
+
|
|
258
258
|
if (chain.skip && chain.limit && chain.sort) {
|
|
259
259
|
currentModel.findById(filter).skip(chain.skip).limit(chain.limit).sort(chain.sort)
|
|
260
260
|
} else if (chain.skip && chain.limit) {
|
package/package.json
CHANGED
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongoplusplus",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "load balancing of read and write operations across multiple MongoDB servers ",
|
|
5
5
|
"main": "mongoplus.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
8
|
},
|
|
9
9
|
"author": "somen das(somen6562@gmail.com)",
|
|
10
|
-
"keywords": [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
10
|
+
"keywords": [
|
|
11
|
+
"MongoDB",
|
|
12
|
+
"Database",
|
|
13
|
+
"ORM",
|
|
14
|
+
"Wrapper",
|
|
15
|
+
"Mongoose",
|
|
16
|
+
"Multi-Database",
|
|
17
|
+
"Data Management",
|
|
18
|
+
"Async Operations",
|
|
19
|
+
"Scalable",
|
|
20
|
+
"Readability",
|
|
21
|
+
"Performance",
|
|
22
|
+
"Node.js",
|
|
23
|
+
"Worker Threads",
|
|
24
|
+
"Connection Pooling",
|
|
25
|
+
"Schema Management",
|
|
26
|
+
"CRUD Operations",
|
|
27
|
+
"Document-Oriented",
|
|
28
|
+
"Distributed",
|
|
29
|
+
"Replication",
|
|
30
|
+
"Sharding",
|
|
31
|
+
"load balancing",
|
|
32
|
+
"multiple database",
|
|
33
|
+
"Aggregation Framework"
|
|
34
|
+
],
|
|
33
35
|
"license": "ISC",
|
|
34
36
|
"dependencies": {
|
|
35
37
|
"mongoose": "^6.3.5",
|
|
36
|
-
"mongoose-sequence": "^5.3.1"
|
|
38
|
+
"mongoose-sequence": "^5.3.1",
|
|
39
|
+
"mongoplusplus": "^1.0.1"
|
|
37
40
|
}
|
|
38
41
|
}
|