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.
Files changed (2) hide show
  1. package/mongoplus.js +4 -4
  2. 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
- var chain = pair.chain;
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
- var chain = pair.chain;
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
- var chain = pair.chain;
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
- var chain = pair.chain;
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.1",
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": [ "MongoDB",
11
- "Database",
12
- "ORM",
13
- "Wrapper",
14
- "Mongoose",
15
- "Multi-Database",
16
- "Data Management",
17
- "Async Operations",
18
- "Scalable",
19
- "Readability",
20
- "Performance",
21
- "Node.js",
22
- "Worker Threads",
23
- "Connection Pooling",
24
- "Schema Management",
25
- "CRUD Operations",
26
- "Document-Oriented",
27
- "Distributed",
28
- "Replication",
29
- "Sharding",
30
- "load balancing",
31
- "multiple database",
32
- "Aggregation Framework"],
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
  }