multi-db-orm 2.1.16 → 2.1.18

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.
@@ -15,7 +15,19 @@ export class MultiDbORM {
15
15
 
16
16
  getdb(): any;
17
17
 
18
- get(modelname: string, filter: Record<string, any>): Promise<any>;
18
+ get(modelname: string, filter?: Record<string, any>, options?: {
19
+ apply?: {
20
+ field: string,
21
+ sort: string,
22
+ ineq: {
23
+ op: '>=' | '<=' | '=' | '>' | '<',
24
+ value: string | number | boolean
25
+ }
26
+ },
27
+ sort?: { field: string, order: 'asc' | 'desc' }[]
28
+ limit?: number,
29
+ offset?: number
30
+ }): Promise<any>;
19
31
 
20
32
  getOne(modelname: string, filter: Record<string, any>): Promise<any>;
21
33
 
@@ -25,5 +37,5 @@ export class MultiDbORM {
25
37
 
26
38
  update(modelname: string, filter: Record<string, any>, object: Record<string, any>): Promise<any>;
27
39
 
28
- delete(modelname: string, filter: Record<string, any>): Promise<any>;
40
+ delete(modelname: string, filter?: Record<string, any>): Promise<any>;
29
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multi-db-orm",
3
- "version": "2.1.16",
3
+ "version": "2.1.18",
4
4
  "description": "CRUD , Backup , Restore and Migration library for multiple databases",
5
5
  "main": "index.js",
6
6
  "dependencies": {