db2go

command
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: MIT Imports: 7 Imported by: 0

README

db2go is a command to export database table structure to go or proto file

Usage

--url connection url of database [required]

--db databases to export, eg. "test" [required]

--table tables to export, eg. "users, devices" [optional]

--out output directory, default . [optional]

--package export to a directory which used to be a package name in golang [optional]

--prefix prefix of go file name [optional]

--suffix suffix of go file name [optional]

--tag customer golang struct member tag [optional]

--without ignore columns [optional]

--readonly specify columns only for select [optional]

--proto generate .proto file [optional]

--gogo-options specify gogo proto options [optional]

--one-file all table schema integrate into one file named by database [optional]

# db2go --url "mysql://root:123456@127.0.0.1:3306/test?charset=utf8" --db test --table users --package model --out $GOPATH/src/myproject

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Code generated by db2go.
Code generated by db2go.

Jump to

Keyboard shortcuts

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