multi-db-orm 2.1.8 → 2.1.10

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.
@@ -1,4 +1,4 @@
1
- import { MultiDbORM, MultiDbORMOptions } from './MultiDbORM';
1
+ import { MultiDbORM } from './multidb';
2
2
 
3
3
  interface ServiceAccount {
4
4
  type: string;
@@ -19,21 +19,21 @@ export declare class FireStoreDB extends MultiDbORM {
19
19
 
20
20
  constructor(serviceAccount: ServiceAccount, appname?: string);
21
21
 
22
- async run(query: string): Promise<any>;
22
+ run(query: string): Promise<any>;
23
23
 
24
24
  attachOptions(modelref: any, options: any): any;
25
25
 
26
- async _get(modelname: string, filter: any, options?: any): Promise<any>;
26
+ _get(modelname: string, filter: any, options?: any): Promise<any>;
27
27
 
28
- async get(modelname: string, filter: any, options?: any): Promise<any>;
28
+ get(modelname: string, filter: any, options?: any): Promise<any>;
29
29
 
30
- async getOne(modelname: string, filter: any, id?: string, options?: any): Promise<any>;
30
+ getOne(modelname: string, filter: any, id?: string, options?: any): Promise<any>;
31
31
 
32
- async create(modelname: string, sampleObject: any): Promise<any>;
32
+ create(modelname: string, sampleObject: any): Promise<any>;
33
33
 
34
- async insert(modelname: string, object: any, id?: string): Promise<any>;
34
+ insert(modelname: string, object: any, id?: string): Promise<any>;
35
35
 
36
- async update(modelname: string, filter: any, object: any, id?: string): Promise<any>;
36
+ update(modelname: string, filter: any, object: any, id?: string): Promise<any>;
37
37
 
38
- async delete(modelname: string, filter: any, id?: string): Promise<any>;
38
+ delete(modelname: string, filter: any, id?: string): Promise<any>;
39
39
  }
@@ -1,5 +1,6 @@
1
- export { MultiDbORM } from './engines/multidb';
2
- export { SQLiteDB } from './engines/sqlitedb';
3
- export { MongoDB } from './engines/mongodb';
4
- export { FireStoreDB } from './engines/firestoredb';
5
- export { OracleDB } from './engines/oracledb';
1
+ export * from './multidb';
2
+ export * from './sqlitedb';
3
+ export * from './mongodb';
4
+ export * from './firestoredb';
5
+ export * from './oracledb';
6
+ export * from './mysqldb';
@@ -1,5 +1,5 @@
1
1
  import MongoClient from 'mongodb/lib/mongo_client';
2
- import { MultiDbORM, MultiDbORMOptions } from './MultiDbORM';
2
+ import { MultiDbORM } from './multidb';
3
3
 
4
4
  export declare class MongoDB extends MultiDbORM {
5
5
  mongodbname: string;
@@ -10,9 +10,9 @@ export declare class MongoDB extends MultiDbORM {
10
10
 
11
11
  constructor(secureUrl: string, mongodbname: string);
12
12
 
13
- async _close(): Promise<void>;
13
+ _close(): Promise<void>;
14
14
 
15
- async _connect(): Promise<void>;
15
+ _connect(): Promise<void>;
16
16
 
17
- async run(query: string): Promise<any>;
17
+ run(query: string): Promise<any>;
18
18
  }
@@ -9,21 +9,21 @@ export class MultiDbORM {
9
9
 
10
10
  constructor(db: any);
11
11
 
12
- async connect(): Promise<void>;
12
+ connect(): Promise<void>;
13
13
 
14
14
  setdb(db: any): void;
15
15
 
16
16
  getdb(): any;
17
17
 
18
- async get(modelname: string, filter: Record<string, any>): Promise<void>;
18
+ get(modelname: string, filter: Record<string, any>): Promise<any>;
19
19
 
20
- async getOne(modelname: string, filter: Record<string, any>): Promise<void>;
20
+ getOne(modelname: string, filter: Record<string, any>): Promise<any>;
21
21
 
22
- async create(modelname: string, object: Record<string, any>): Promise<void>;
22
+ create(modelname: string, object: Record<string, any>): Promise<any>;
23
23
 
24
- async insert(modelname: string, object: Record<string, any>): Promise<void>;
24
+ insert(modelname: string, object: Record<string, any>): Promise<any>;
25
25
 
26
- async update(modelname: string, filter: Record<string, any>, object: Record<string, any>): Promise<void>;
26
+ update(modelname: string, filter: Record<string, any>, object: Record<string, any>): Promise<any>;
27
27
 
28
- async delete(modelname: string, filter: Record<string, any>): Promise<void>;
28
+ delete(modelname: string, filter: Record<string, any>): Promise<any>;
29
29
  }
@@ -1,24 +1,5 @@
1
1
  import { MultiDbORM } from './multidb';
2
2
 
3
- declare module 'mysql' {
4
- import { EventEmitter } from 'events';
5
-
6
- export interface ConnectionConfig {
7
- host: string;
8
- port: number;
9
- user: string;
10
- password: string;
11
- database?: string;
12
- }
13
-
14
- export class Connection extends EventEmitter {
15
- constructor(config: ConnectionConfig);
16
- connect(): void;
17
- end(): void;
18
- query(query: string, callback: (error: Error | null, results: any, fields: any) => void): void;
19
- }
20
- }
21
-
22
3
  export type MySQLDBConfig = {
23
4
  host: string;
24
5
  port: string;
@@ -1,4 +1,4 @@
1
- import { MultiDbORM, MultiDbORMOptions } from './MultiDbORM';
1
+ import { MultiDbORM } from './multidb';
2
2
 
3
3
  export interface OracleDBConfig {
4
4
  username: string;
@@ -18,7 +18,7 @@ export declare class OracleDB extends MultiDbORM {
18
18
 
19
19
  constructor(config: OracleDBConfig);
20
20
 
21
- async connect(): Promise<void>;
21
+ connect(): Promise<void>;
22
22
 
23
- async run(query: string): Promise<any>;
23
+ run(query: string): Promise<any>;
24
24
  }
@@ -1,4 +1,4 @@
1
- import { MultiDbORM, MultiDbORMOptions } from './MultiDbORM';
1
+ import { MultiDbORM } from './multidb';
2
2
 
3
3
  export declare class SQLiteDB extends MultiDbORM {
4
4
  sqlite3: typeof import('sqlite3');
@@ -6,6 +6,6 @@ export declare class SQLiteDB extends MultiDbORM {
6
6
 
7
7
  constructor(filepath?: string);
8
8
 
9
- async run(query: string): Promise<any>;
9
+ run(query: string): Promise<any>;
10
10
 
11
11
  }
package/index.d.ts CHANGED
@@ -1,7 +1 @@
1
- export { MultiDbORM } from './engines/multidb';
2
- export { SQLiteDB } from './engines/sqlitedb';
3
- export { MongoDB } from './engines/mongodb';
4
- export { FireStoreDB } from './engines/firestoredb';
5
- export { OracleDB } from './engines/oracledb';
6
- export { MySQLDB } from './engines/mysqldb';
7
-
1
+ export * from './engines'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multi-db-orm",
3
- "version": "2.1.8",
3
+ "version": "2.1.10",
4
4
  "description": "CRUD , Backup , Restore and Migration library for multiple databases",
5
5
  "main": "index.js",
6
6
  "dependencies": {