Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taranjeet/mysqlverticalformattoinsertquery
This converts the mysql vertical format(\G) to a proper insert statement
https://github.com/taranjeet/mysqlverticalformattoinsertquery
Last synced: 19 days ago
JSON representation
This converts the mysql vertical format(\G) to a proper insert statement
- Host: GitHub
- URL: https://github.com/taranjeet/mysqlverticalformattoinsertquery
- Owner: taranjeet
- Created: 2016-08-14T12:45:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-17T14:45:01.000Z (almost 8 years ago)
- Last Synced: 2024-11-10T06:24:38.528Z (3 months ago)
- Language: Python
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mysqlVerticalFormatToInsertQuery
A simple utility to convert mysql output into a insert command
## Example
Consider the following table output from repos_table
```
# assuming this is a mysql session
mysql> SELECT * from repos_table\G
*************************** 1. row ***************************
id: 1
repo_name: mysqlVerticalFormatToInsertQuery
*************************** 2. row ***************************
id: 2
repo_name: greb
```If the above output is saved in a file named `default` and then on running
the script following will be produced```
./convert.py repos_table
INSERT INTO repos_table (`id`, `repo_name`) VALUES (1, "mysqlVerticalFormatToInsertQuery"), (2, "greb");
```