mysql2json-go

module
v0.0.0-...-f0c82e6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2016 License: Apache-2.0

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

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL