Skip to content

Commit 16fe7df

Browse files
committed
fix db.QueryStruct appending pkValues
1 parent 7a66e80 commit 16fe7df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

db/query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func QueryValueOrDefault[T any](ctx context.Context, query string, args ...any)
6464
// for the passed pkValue+pkValues and a table name.
6565
func QueryStruct[S any](ctx context.Context, pkValue any, pkValues ...any) (row *S, err error) {
6666
if len(pkValues) > 0 {
67-
pkValues = append([]any{pkValues}, pkValues...)
67+
pkValues = append([]any{pkValue}, pkValues...)
6868
}
6969
t := reflect.TypeOf(row).Elem()
7070
if t.Kind() != reflect.Struct {

0 commit comments

Comments
 (0)