mirror of
https://github.com/astaxie/beego.git
synced 2024-11-23 02:20:55 +00:00
minor code refactor
This commit is contained in:
parent
ccab9a7044
commit
1f9281c830
@ -122,7 +122,10 @@ func (qb *MySQLQueryBuilder) Set(kv ...string) QueryBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (qb *MySQLQueryBuilder) Delete(tables ...string) QueryBuilder {
|
func (qb *MySQLQueryBuilder) Delete(tables ...string) QueryBuilder {
|
||||||
qb.Tokens = append(qb.Tokens, "DELETE", strings.Join(tables, COMMA_SPACE))
|
qb.Tokens = append(qb.Tokens, "DELETE")
|
||||||
|
if len(tables) != 0 {
|
||||||
|
qb.Tokens = append(qb.Tokens, strings.Join(tables, COMMA_SPACE))
|
||||||
|
}
|
||||||
return qb
|
return qb
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user