0.1.3 • Published 5 years ago

mraj v0.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

MRAJ -- MySQL Results As JSON

M R A J
y e s S
S s   O
Q u   N
L l
t
s

Run a sql query and print the results to stdout as JSON.

A username, hostname, and password are required and can be passed either as command line arguments (-u, -h, and -p, respectively), or read from a config file.

This tool will look for a file named .env in the current working directory and read the values from it.

Example .env

username = zach
password = p@$$w0rd
host = db.example.com

The query must be supplied with the -e (or --query) option.

In addition, the indentation level of the resulting JSON can be specified with -i or --indent (0 will do no indentation).

Examples

mraj -e 'SELECT * FROM blog_db.posts' -u blog_user -h db.blog.com -p 'p@$$w0rd'
# assuming a .env file is present
mraj -e 'SELECT * FROM blog_db.posts'
0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago