@stackpress/inquire-mysql2 0.3.16 → 0.3.21
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/README.md +24 -2
- package/package.json +11 -4
package/README.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
-
# 💬 Inquire
|
|
1
|
+
# 💬 Inquire - MySQL2
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
MySQL2 connection for the Inquire library.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
$ npm i @stackpress/inquire-mysql2
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import mysql from 'mysql2/promise';
|
|
15
|
+
import connect from '@stackpress/inquire-mysql2';
|
|
16
|
+
|
|
17
|
+
//this is the raw resource, anything you want
|
|
18
|
+
const resource = await mysql.createConnection({
|
|
19
|
+
host: 'localhost',
|
|
20
|
+
user: 'root',
|
|
21
|
+
database: 'inquire',
|
|
22
|
+
});
|
|
23
|
+
//this maps the resource to the engine
|
|
24
|
+
const engine = connect(resource);
|
|
25
|
+
```
|
package/package.json
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackpress/inquire-mysql2",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.21",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Generic typed mysql2",
|
|
6
6
|
"author": "Chris <chris@incept.asia>",
|
|
7
7
|
"homepage": "https://github.com/stackpress/inquire",
|
|
8
8
|
"bugs": "https://github.com/stackpress/inquire/issues",
|
|
9
9
|
"repository": "stackpress/inquire",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"ts",
|
|
12
|
+
"typescript",
|
|
13
|
+
"database",
|
|
14
|
+
"sql",
|
|
15
|
+
"mysql",
|
|
16
|
+
"stackpress"
|
|
17
|
+
],
|
|
10
18
|
"main": "index.js",
|
|
11
19
|
"files": [
|
|
12
20
|
"dist",
|
|
@@ -17,10 +25,10 @@
|
|
|
17
25
|
],
|
|
18
26
|
"scripts": {
|
|
19
27
|
"build": "tsc",
|
|
20
|
-
"test": "
|
|
28
|
+
"test": "ts-mocha tests/*.test.ts"
|
|
21
29
|
},
|
|
22
30
|
"dependencies": {
|
|
23
|
-
"@stackpress/inquire": "0.3.
|
|
31
|
+
"@stackpress/inquire": "0.3.21"
|
|
24
32
|
},
|
|
25
33
|
"peerDependencies": {
|
|
26
34
|
"mysql2": "^3.11.5"
|
|
@@ -31,7 +39,6 @@
|
|
|
31
39
|
"@types/node": "22.9.3",
|
|
32
40
|
"chai": "4.5.0",
|
|
33
41
|
"mocha": "10.8.2",
|
|
34
|
-
"nyc": "17.1.0",
|
|
35
42
|
"ts-mocha": "10.0.0",
|
|
36
43
|
"mysql2": "3.11.5",
|
|
37
44
|
"ts-node": "10.9.2",
|