sql2struct

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

README

sql2struct

Installation

Download from https://github.com/tkuchiki/sql2struct/releases

Usage

$ sql2struct --help
Usage: sql2struct <command>

Flags:
  -h, --help                   Show context-sensitive help.
      --db-user=STRING         database uesr
      --db-pass=STRING         database password
      --db-host="localhost"    database host
      --db-port=3306           database port
      --db-sock=STRING         database socket
      --db-name=STRING         database name
      --sql=STRING             sql

Commands:
  version
    show version

Run "sql2struct <command> --help" for more information on a command.

Examples

$ sql2struct --db-user=root --dbname=testdb --sql "SELECT t1.*, t2.name FROM t1 JOIN t1.id = t2.t1_id"

$ echo "SELECT t1.*, t2.name FROM t1 JOIN t1.id = t2.t1_id" | sql2struct --db-user=root --dbname=testdb

# show version
$ sql2struct version

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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