Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CmdDriver = &Command{
UsageLine: "driver",
Short: "list all supported drivers",
Long: `
list all supported drivers
`,
}
View Source
var CmdDump = &Command{
UsageLine: "dump driverName datasourceName",
Short: "dump database all table struct's and data to standard output",
Long: `
dump database for sqlite3, mysql, postgres.
driverName Database driver name, now supported four: mysql mymysql sqlite3 postgres
datasourceName Database connection uri, for detail infomation please visit driver's project page
`,
}
View Source
var CmdReverse = &Command{
UsageLine: "reverse [-s] driverName datasourceName tmplPath [generatedPath] [tableFilterReg]",
Short: "reverse a db to codes",
Long: `
according database's tables and columns to generate codes for Go, C++ and etc.
-s Generated one go file for every table
driverName Database driver name, now supported four: mysql mymysql sqlite3 postgres
datasourceName Database connection uri, for detail infomation please visit driver's project page
tmplPath Template dir for generated. the default templates dir has provide 1 template
generatedPath This parameter is optional, if blank, the default value is models, then will
generated all codes in models dir
tableFilterReg Table name filter regexp
`,
}
View Source
var CmdShell = &Command{
UsageLine: "shell driverName datasourceName",
Short: "a general shell to operate all kinds of database",
Long: `
general database's shell for sqlite3, mysql, postgres.
driverName Database driver name, now supported four: mysql mymysql sqlite3 postgres
datasourceName Database connection uri, for detail infomation please visit driver's project page
`,
}
View Source
var CmdSource = &Command{
UsageLine: "source driverName datasourceName",
Short: "source execute std in to datasourceName",
Long: `
source from standard std in for sqlite3, mysql, postgres.
driverName Database driver name, now supported four: mysql mymysql sqlite3 postgres
datasourceName Database connection uri, for detail infomation please visit driver's project page
`,
}
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { // Run runs the command. // The args are the arguments after the command name. Run func(cmd *Command, args []string) // UsageLine is the one-line usage message. // The first word in the line is taken to be the command name. UsageLine string // Short is the short description shown in the 'go help' output. Short string // Long is the long message shown in the 'go help <this-command>' output. Long string // Flag is a set of flags specific to this command. Flags map[string]bool }
A Command is an implementation of a go command like go build or go fix.
Click to show internal directories.
Click to hide internal directories.