1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-02 10:33:27 +00:00

minor code refactor

This commit is contained in:
ZhengYang 2014-09-11 15:17:48 +08:00
parent ccab9a7044
commit 1f9281c830

View File

@ -122,7 +122,10 @@ func (qb *MySQLQueryBuilder) Set(kv ...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
}