@rws-framework/db 2.2.3 → 2.2.4

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.
@@ -61,5 +61,6 @@ declare class RWSModel<ChildClass> implements IModel {
61
61
  private checkRelEnabled;
62
62
  static setServices(services: IRWSModelServices): void;
63
63
  getDb(): DBService;
64
+ static getDb(): DBService;
64
65
  }
65
66
  export { RWSModel };
@@ -361,6 +361,9 @@ class RWSModel {
361
361
  getDb() {
362
362
  return this.services.dbService;
363
363
  }
364
+ static getDb() {
365
+ return this.services.dbService;
366
+ }
364
367
  }
365
368
  exports.RWSModel = RWSModel;
366
369
  RWSModel.services = {};
@@ -4,6 +4,7 @@ export interface IModel {
4
4
  [key: string]: any;
5
5
  id: string | null;
6
6
  save: () => void;
7
+ getDb: () => DBService;
7
8
  getCollection: () => string | null;
8
9
  configService?: IDbConfigHandler;
9
10
  dbService?: DBService;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rws-framework/db",
3
3
  "private": false,
4
- "version": "2.2.3",
4
+ "version": "2.2.4",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -477,6 +477,11 @@ class RWSModel<ChildClass> implements IModel {
477
477
  {
478
478
  return this.services.dbService;
479
479
  }
480
+
481
+ public static getDb(): DBService
482
+ {
483
+ return this.services.dbService;
484
+ }
480
485
  }
481
486
 
482
487
  export { RWSModel };
@@ -5,6 +5,7 @@ export interface IModel {
5
5
  [key: string]: any;
6
6
  id: string | null;
7
7
  save: () => void;
8
+ getDb: () => DBService;
8
9
  getCollection: () => string | null;
9
10
  configService?: IDbConfigHandler;
10
11
  dbService?: DBService;