Skip to content

Commit 6ef029a

Browse files
authored
docs: add mysqljs/mysql and MySQL2 instructions (#15)
1 parent 7213474 commit 6ef029a

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,34 @@ deno add npm:sql-escaper
5353

5454
---
5555

56+
### [MySQL2](https://github.com/sidorares/node-mysql2)
57+
58+
🚧 For **MySQL2**, it already uses **SQL Escaper** as its default escaping library since version `3.17.0`, so you just need to update it to the latest version:
59+
60+
```bash
61+
npm i mysql2@latest # soon
62+
```
63+
64+
- Check the progress migration in [sidorares/node-mysql2#4054](https://github.com/sidorares/node-mysql2/pull/4054).
65+
66+
### [mysqljs/mysql](https://github.com/mysqljs/mysql)
67+
68+
You can use an overrides in your _package.json_:
69+
70+
```json
71+
"dependencies": {
72+
"mysql": "^2.18.1"
73+
},
74+
"overrides": {
75+
"sqlstring": "npm:sql-escaper"
76+
}
77+
```
78+
79+
- Next, clean the `node_modules` and reinstall the dependencies (`npm i`).
80+
- Please, note the minimum supported version of **Node.js** is `12`.
81+
82+
---
83+
5684
## Usage
5785

5886
### Quickstart

0 commit comments

Comments
 (0)