Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSqlBuilder ¶
func NewSqlBuilder() *sqlBuilder
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 实例化SqlBuilder * args: sql base path * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Types ¶
type Database ¶
type Database struct { Source DatabaseSource Name string //数据库名称 Sql string //sql语句 IsNew bool //是否重新创建 IsBuilded bool //是否已生成过 // contains filtered or unexported fields }
func (*Database) Close ¶
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 关闭数据库连接 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*Database) Exec ¶
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 运行Sql语句 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
type DatabaseConfig ¶
type DatabaseConfig struct { Name string Count int TableConfigs TableConfigList Source DatabaseSource IsNew bool //是否重建库 IsSharding bool //是否分片 IsBuilded bool //是否已生成过 }
type DatabaseConfigList ¶
type DatabaseConfigList []DatabaseConfig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 数据库配置域结构 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
type DatabaseList ¶
type DatabaseList []*Database
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 数据库域结构 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
type DatabaseSource ¶
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 数据源配置域结构 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
type TableConfig ¶
type TableConfigList ¶
type TableConfigList []TableConfig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 数据表配置域结构 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++