-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
47 lines (42 loc) · 1.17 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { Model, ModelItem } from "./src/model.js";
import { SQLBuilder } from "./src/sql.js";
import {
DBDriver,
MySQLDBDriver,
RawFunctionDBDriver,
SQLiteDBDriver,
} from "./src/multisupport.js";
/**
* Main class representing the Node ORM library.
* @class NodeORM
*/
export declare class NodeORM {
/**
* An array of supported database drivers.
*/
static dbdrivers: (new (dbinstance: any) => DBDriver)[];
/**
* The default database instance to use if no other valid instance is provided.
*/
static defaultDB: any;
/**
* Determines the appropriate database driver based on the provided instance or the default database.
* @param dbinstance - The database instance to determine the driver for. Pass 'env' to read database credentials from environment variables.
* @returns The determined database driver.
*/
static determine(dbinstance?: any): Promise<DBDriver>;
}
export declare function initialize(
connection: typeof DBDriver,
...models: Array<typeof Model>
): Promise<void>;
// Exporting the database driver classes
export {
MySQLDBDriver,
SQLiteDBDriver,
RawFunctionDBDriver,
DBDriver,
Model,
ModelItem,
SQLBuilder,
};