ms-types 0.0.16 → 0.0.17
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/package.json +1 -1
- package/types/mysql.d.ts +5 -12
package/package.json
CHANGED
package/types/mysql.d.ts
CHANGED
|
@@ -37,11 +37,11 @@ declare namespace mysql {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* 连接到数据库
|
|
41
41
|
* @param config 连接配置对象
|
|
42
|
-
* @returns
|
|
42
|
+
* @returns 是否连接成功
|
|
43
43
|
* @example
|
|
44
|
-
* mysql.
|
|
44
|
+
* const connected = mysql.connect({
|
|
45
45
|
* host: "localhost",
|
|
46
46
|
* port: 3306,
|
|
47
47
|
* username: "root",
|
|
@@ -49,19 +49,12 @@ declare namespace mysql {
|
|
|
49
49
|
* database: "test_db",
|
|
50
50
|
* charset: "utf8mb4"
|
|
51
51
|
* })
|
|
52
|
-
|
|
53
|
-
function createConnection(config: MySQLConfig): boolean;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* 连接到数据库
|
|
57
|
-
* @returns 是否连接成功
|
|
58
|
-
* @example
|
|
59
|
-
* const connected = mysql.connect()
|
|
52
|
+
*
|
|
60
53
|
* if (connected) {
|
|
61
54
|
* logger.info("数据库连接成功")
|
|
62
55
|
* }
|
|
63
56
|
*/
|
|
64
|
-
function connect(): boolean;
|
|
57
|
+
function connect(config: MySQLConfig): boolean;
|
|
65
58
|
|
|
66
59
|
/**
|
|
67
60
|
* 断开数据库连接
|