1f9281c8 by ZhengYang

minor code refactor

1 parent ccab9a70
...@@ -122,7 +122,10 @@ func (qb *MySQLQueryBuilder) Set(kv ...string) QueryBuilder { ...@@ -122,7 +122,10 @@ func (qb *MySQLQueryBuilder) Set(kv ...string) QueryBuilder {
122 } 122 }
123 123
124 func (qb *MySQLQueryBuilder) Delete(tables ...string) QueryBuilder { 124 func (qb *MySQLQueryBuilder) Delete(tables ...string) QueryBuilder {
125 qb.Tokens = append(qb.Tokens, "DELETE", strings.Join(tables, COMMA_SPACE)) 125 qb.Tokens = append(qb.Tokens, "DELETE")
126 if len(tables) != 0 {
127 qb.Tokens = append(qb.Tokens, strings.Join(tables, COMMA_SPACE))
128 }
126 return qb 129 return qb
127 } 130 }
128 131
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!