xorm

command
v0.3.2-0...-a8be9a5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2014 License: BSD-3-Clause Imports: 23 Imported by: 0

README

xorm tools

xorm tools is a set of tools for database operation.

Install

go get github.com/lunny/xorm/xorm

and you should install the depends below:

Reverse

After you installed the tool, you can type

xorm help reverse

to get help

example:

sqlite: xorm reverse sqite3 test.db templates/goxorm

mysql: xorm reverse mysql root:@/xorm_test?charset=utf8 templates/goxorm

mymysql: xorm reverse mymysql xorm_test2/root/ templates/goxorm

postgres: xorm reverse postgres "dbname=xorm_test sslmode=disable" templates/goxorm

will generated go files in ./model directory

Template and Config

Now, xorm tool supports go and c++ two languages and have go, goxorm, c++ three of default templates. In template directory, we can put a config file to control how to generating.

lang=go
genJson=1
```

lang must be go or c++ now.
genJson can be 1 or 0, if 1 then the struct will have json tag.

## LICENSE

 BSD License
 [http://creativecommons.org/licenses/BSD/](http://creativecommons.org/licenses/BSD/)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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