Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b46813f

Browse files
committed
Pass arguments
1 parent 29d41ab commit b46813f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

coderd/database/sqlxqueries/sqlx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
func SelectContext[RT any](ctx context.Context, q sqlx.QueryerContext, queryName string, argument interface{}) ([]RT, error) {
1414
var empty []RT
1515

16-
query, err := query(queryName, nil)
16+
query, err := query(queryName, argument)
1717
if err != nil {
1818
return empty, xerrors.Errorf("get query: %w", err)
1919
}

coderd/database/sqlxqueries/workspace.gosql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ INNER JOIN
1313

1414

1515
{{ define "GetWorkspaceBuild" }}
16-
-- {{ . }}}}
1716
-- name: GetWorkspaceBuild :one
1817
SELECT
1918
*
@@ -54,7 +53,7 @@ WHERE
5453
ORDER BY
5554
build_number desc
5655
{{ end }}
57-
{{ if gt .TestLimit 0 }} LIMIT @limit_opt {{ end }};
56+
LIMIT @limit_opt;
5857
{{ end }}
5958

6059

0 commit comments

Comments
 (0)