Versions in this module Expand all Collapse all v1 v1.10.0 Jul 22, 2018 Changes in this version + const DDLSpecAlter + const DDLSpecCreate + const MigrationDown + const MigrationHeader + const MigrationUp + var DDL utils.DocValue type OrmTag + Comment string v1.8.3 Apr 24, 2017 Changes in this version + const CtrlTPL + const DBPath + const HproseAddFunction + const HproseModelTPL + const HproseStructModelTPL + const MDateFormat + const MPath + const MigrationTPL + const ModelTPL + const NamespaceTPL + const OController + const OModel + const ORouter + const RouterTPL + const StructModelTPL + var Fields utils.DocValue + var HproseAddFunctions = []string + var HproseMainconngo = ... + var HproseMaingo = ... + var HproseModels = ... + var HproseModels2 = ... + var Hproseconf = ... + var Level utils.DocValue + var SQLConn utils.DocValue + var SQLDriver utils.DocValue + var Tables utils.DocValue + func GenerateAppcode(driver, connStr, level, tables, currpath string) + func GenerateController(cname, currpath string) + func GenerateHproseAppcode(driver, connStr, level, tables, currpath string) + func GenerateMigration(mname, upsql, downsql, curpath string) + func GenerateModel(mname, fields, currpath string) + func GenerateScaffold(sname, fields, currpath, driver, conn string) + func GenerateView(viewpath, currpath string) + type Column struct + Name string + Tag *OrmTag + Type string + func (col *Column) String() string + type DBDriver interface + GenerateCreateDown func(tableName string) string + GenerateCreateUp func(tableName string) string + func NewDBDriver() DBDriver + type DbTransformer interface + GetColumns func(conn *sql.DB, table *Table, blackList map[string]bool) + GetConstraints func(conn *sql.DB, table *Table, blackList map[string]bool) + GetGoDataType func(sqlType string) (string, error) + GetTableNames func(conn *sql.DB) []string + type ForeignKey struct + Name string + RefColumn string + RefSchema string + RefTable string + type MvcPath struct + ControllerPath string + ModelPath string + RouterPath string + type MysqlDB struct + func (*MysqlDB) GetConstraints(db *sql.DB, table *Table, blackList map[string]bool) + func (*MysqlDB) GetGoDataType(sqlType string) (string, error) + func (*MysqlDB) GetTableNames(db *sql.DB) (tables []string) + func (mysqlDB *MysqlDB) GetColumns(db *sql.DB, table *Table, blackList map[string]bool) + type OrmTag struct + Auto bool + AutoNow bool + AutoNowAdd bool + Column string + Decimals string + Default string + Digits string + Index bool + Null bool + Pk bool + RelFk bool + RelM2M bool + RelOne bool + ReverseMany bool + ReverseOne bool + Size string + Type string + Unique bool + func (tag *OrmTag) String() string + type PostgresDB struct + func (*PostgresDB) GetConstraints(db *sql.DB, table *Table, blackList map[string]bool) + func (*PostgresDB) GetGoDataType(sqlType string) (string, error) + func (*PostgresDB) GetTableNames(db *sql.DB) (tables []string) + func (postgresDB *PostgresDB) GetColumns(db *sql.DB, table *Table, blackList map[string]bool) + type Table struct + Columns []*Column + Fk map[string]*ForeignKey + ImportTimePkg bool + Name string + Pk string + Uk []string + func (tb *Table) String() string