Skip to content

Inspired by Arturom - Connects to a MySQL database and prints JSON formatted records

License

Notifications You must be signed in to change notification settings

jrobles/mysql2json-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mysql2json-go

Inspired by Arturom's awesome mysql2json python script. Connects to a MySQL database and prints JSON formatted records to STDOUT...but using Golang!

Use this:

./app -host=server -port=3306 -user=hello -password=hola -database=bonjour -query="SELECT * FROM products LIMIT 1"

Turn this

SELECT * FROM products;
+----+----------------+-------------------+
| id | name           | quantity          |
+----+----------------+-------------------+
|  1 | TLR 22 3.0     |                 1 |
+----+----------------+-------------------+

Into this

[{"id":"1","name":"TLR 22 3.0","quantity":"1"}]

About

Inspired by Arturom - Connects to a MySQL database and prints JSON formatted records

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages