Commit 1f9281c8 authored by ZhengYang's avatar ZhengYang

minor code refactor

parent ccab9a70
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment