multi-db-orm 3.0.12 → 3.1.1

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/sync.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export class Sync {
2
- create(modelname: string, sampleObject: any): void;
3
- insert(modelname: string, object: any): void;
4
- update(modelname: string, filter: any, object: any): void;
5
- delete(modelname: string, filter: any): void;
1
+ export class Sync {
2
+ create(modelname: string, sampleObject: any): void;
3
+ insert(modelname: string, object: any): void;
4
+ update(modelname: string, filter: any, object: any): void;
5
+ delete(modelname: string, filter: any): void;
6
6
  }
package/sync.js CHANGED
@@ -1,49 +1,49 @@
1
- try {
2
- var bkp = require('./backup')
3
- var rst = require('./restore')
4
- } catch (e) {
5
- console.log('Warning : Multi region sync not enabled.' )
6
- }
7
-
8
- class Sync {
9
-
10
- loglevel = 1
11
-
12
- constructor(){
13
-
14
- }
15
-
16
- async create(modelname, object) {
17
- if (this.loglevel > 4)
18
- console.log("Not implemented")
19
- }
20
-
21
- async insert(modelname, object) {
22
- if (this.loglevel > 4)
23
- console.log("Not implemented")
24
- }
25
-
26
- async update(modelname, filter, object) {
27
- if (this.loglevel > 4)
28
- console.log("Not implemented")
29
- }
30
-
31
- async delete(modelname, filter) {
32
- if (this.loglevel > 4)
33
- console.log("Not implemented")
34
- }
35
-
36
- backup(...args) {
37
- bkp(args)
38
- }
39
-
40
- restore(...args) {
41
- rst(args)
42
- }
43
- }
44
-
45
-
46
-
47
- module.exports = {
48
- Sync
1
+ try {
2
+ var bkp = require('./backup')
3
+ var rst = require('./restore')
4
+ } catch (e) {
5
+ console.log('Warning : Multi region sync not enabled.' )
6
+ }
7
+
8
+ class Sync {
9
+
10
+ loglevel = 1
11
+
12
+ constructor(){
13
+
14
+ }
15
+
16
+ async create(modelname, object) {
17
+ if (this.loglevel > 4)
18
+ console.log("Not implemented")
19
+ }
20
+
21
+ async insert(modelname, object) {
22
+ if (this.loglevel > 4)
23
+ console.log("Not implemented")
24
+ }
25
+
26
+ async update(modelname, filter, object) {
27
+ if (this.loglevel > 4)
28
+ console.log("Not implemented")
29
+ }
30
+
31
+ async delete(modelname, filter) {
32
+ if (this.loglevel > 4)
33
+ console.log("Not implemented")
34
+ }
35
+
36
+ backup(...args) {
37
+ bkp(args)
38
+ }
39
+
40
+ restore(...args) {
41
+ rst(args)
42
+ }
43
+ }
44
+
45
+
46
+
47
+ module.exports = {
48
+ Sync
49
49
  }
package/test/models.js CHANGED
@@ -1,23 +1,23 @@
1
- class Game {
2
-
3
- id;
4
- timeStamp;
5
- userid;
6
- amount;
7
- type;
8
-
9
- constructor(id,timeStamp,userid,amount,type){
10
- this.id=id
11
- this.userid=userid
12
- this.amount=amount
13
- this.type=type
14
- this.timeStamp=timeStamp
15
- }
16
-
17
- }
18
-
19
-
20
-
21
- module.exports = {
22
- Game
23
- };
1
+ class Game {
2
+
3
+ id;
4
+ timeStamp;
5
+ userid;
6
+ amount;
7
+ type;
8
+
9
+ constructor(id,timeStamp,userid,amount,type){
10
+ this.id=id
11
+ this.userid=userid
12
+ this.amount=amount
13
+ this.type=type
14
+ this.timeStamp=timeStamp
15
+ }
16
+
17
+ }
18
+
19
+
20
+
21
+ module.exports = {
22
+ Game
23
+ };