代码拉取完成,页面将自动刷新
package gorose
const (
// DriverMysql ...
DriverMysql = "mysql"
)
// BuilderMysql ...
type BuilderMysql struct {
//IOrm
driver string
}
var _ IBuilder = (*BuilderMysql)(nil)
// sqlstr := fmt.Sprintf("SELECT %s%s FROM %s%s%s%s%s%s%s%s",
// distinct, fields, table, join, where, group, having, order, limit, offset)
// select {distinct} {fields} from {table} {join} {where} {group} {having} {order} {limit} {offset}
// {execute} {table} {data} {where}
func init() {
NewBuilderDriver().Register(DriverMysql, NewBuilderMysql())
}
// NewBuilderMysql ...
func NewBuilderMysql() *BuilderMysql {
return new(BuilderMysql)
}
// Clone : a new obj
func (b *BuilderMysql) Clone() IBuilder {
return NewBuilderMysql()
}
// BuildQuery : build query sql string
func (b *BuilderMysql) BuildQuery(o IOrm) (sqlStr string, args []interface{}, err error) {
//fmt.Println(o.GetTable(),o.GetWhere())
sqlStr, args, err = NewBuilderDefault(o).SetDriver(DriverMysql).BuildQuery()
return
}
// BuildExecut : build execute sql string
func (b *BuilderMysql) BuildExecute(o IOrm, operType string) (sqlStr string, args []interface{}, err error) {
return NewBuilderDefault(o).SetDriver(DriverMysql).BuildExecute(operType)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。