module
Version:
v0.0.0-...-f0c82e6
Opens a new window with list of versions in this module.
Published: May 18, 2016
License: Apache-2.0
Opens a new window with license information.
README
¶
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"}]
Directories
¶
Click to show internal directories.
Click to hide internal directories.