Skip to content

Commit 3502e48

Browse files
committed
merge
2 parents 6ef7d0b + 0e6e16e commit 3502e48

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/huandu/go-sqlbuilder
22

3-
go 1.12
3+
go 1.13
44

55
require (
66
github.com/huandu/go-assert v1.1.5

select.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@ func (sb *SelectBuilder) Having(andExpr ...string) *SelectBuilder {
153153

154154
// GroupBy sets columns of GROUP BY in SELECT.
155155
func (sb *SelectBuilder) GroupBy(col ...string) *SelectBuilder {
156-
sb.groupByCols = col
156+
sb.groupByCols = append(sb.groupByCols, col...)
157157
sb.marker = selectMarkerAfterGroupBy
158158
return sb
159159
}
160160

161161
// OrderBy sets columns of ORDER BY in SELECT.
162162
func (sb *SelectBuilder) OrderBy(col ...string) *SelectBuilder {
163-
sb.orderByCols = col
163+
sb.orderByCols = append(sb.orderByCols, col...)
164164
sb.marker = selectMarkerAfterOrderBy
165165
return sb
166166
}

struct_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,7 @@ func (db testDB) Query(string, ...interface{}) (testRows, error) {
244244
return 0, nil
245245
}
246246

247-
func (db testDB) Exec(string, ...interface{}) {
248-
return
247+
func (db testDB) Exec(query string, args ...interface{}) {
249248
}
250249

251250
func (rows testRows) Close() error {

0 commit comments

Comments
 (0)