https://github.com/auridevil/mysql-regex-replace
boilerplate code for massive replace in mysql data
https://github.com/auridevil/mysql-regex-replace
boilerplate boilerplate-node massive mysql nodejs replace
Last synced: 28 days ago
JSON representation
boilerplate code for massive replace in mysql data
- Host: GitHub
- URL: https://github.com/auridevil/mysql-regex-replace
- Owner: auridevil
- Created: 2020-05-12T15:18:46.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T16:58:02.000Z (about 4 years ago)
- Last Synced: 2023-05-18T21:50:18.118Z (about 3 years ago)
- Topics: boilerplate, boilerplate-node, massive, mysql, nodejs, replace
- Language: JavaScript
- Size: 150 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mysql-regex-replace
boilerplate code for data replacement in mysql
## start
```
yarn start
```
## setup
create a .env file with
```
MYSQL_USER=
MYSQL_PWD=
MYSQL_PORT=
MYSQL_DB=
MYSQL_HOST=
```
define in index.mjs the functions
```
selectQuery() // the fetch query
updateRowQuery(id, updatedFieldData) // the update query
replaceText(dataRow) // the single row transform data, return updatedFieldData
getRowId(dataRow) // return the unique identifier of the row, for the update usage
```
## licensing and use
free to use, see ya at zabriskie point