Skip to content

Commit 837bd92

Browse files
committed
fix: update queryablePGX interface to be accurate to pgx.
1 parent 16cbf3f commit 837bd92

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

qrm/qrm_pgx.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"reflect"
99
)
1010

11-
// QueryablePGX interface for pgx QueryContext method
11+
// QueryablePGX interface for pgx Query method
1212
type QueryablePGX interface {
13-
QueryContext(ctx context.Context, query string, args ...any) (pgx.Rows, error)
13+
Query(ctx context.Context, query string, args ...any) (pgx.Rows, error)
1414
}
1515

1616
// QueryPGXJsonObj executes a SQL query that returns a JSON object, unmarshals the result into the provided destination,
@@ -121,7 +121,7 @@ func queryToSlicePGX(ctx context.Context, db QueryablePGX, query string, args []
121121
ctx = context.Background()
122122
}
123123

124-
rows, err := db.QueryContext(ctx, query, args...)
124+
rows, err := db.Query(ctx, query, args...)
125125

126126
if err != nil {
127127
return
@@ -165,7 +165,7 @@ func queryPGXJson(ctx context.Context, db QueryablePGX, query string, args []int
165165
must.BeInitializedPtr(db, "jet: db is nil")
166166

167167
var rows pgx.Rows
168-
rows, err = db.QueryContext(ctx, query, args...)
168+
rows, err = db.Query(ctx, query, args...)
169169

170170
if err != nil {
171171
return 0, err

0 commit comments

Comments
 (0)