|
8 | 8 | "reflect" |
9 | 9 | ) |
10 | 10 |
|
11 | | -// QueryablePGX interface for pgx QueryContext method |
| 11 | +// QueryablePGX interface for pgx Query method |
12 | 12 | 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) |
14 | 14 | } |
15 | 15 |
|
16 | 16 | // 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 [] |
121 | 121 | ctx = context.Background() |
122 | 122 | } |
123 | 123 |
|
124 | | - rows, err := db.QueryContext(ctx, query, args...) |
| 124 | + rows, err := db.Query(ctx, query, args...) |
125 | 125 |
|
126 | 126 | if err != nil { |
127 | 127 | return |
@@ -165,7 +165,7 @@ func queryPGXJson(ctx context.Context, db QueryablePGX, query string, args []int |
165 | 165 | must.BeInitializedPtr(db, "jet: db is nil") |
166 | 166 |
|
167 | 167 | var rows pgx.Rows |
168 | | - rows, err = db.QueryContext(ctx, query, args...) |
| 168 | + rows, err = db.Query(ctx, query, args...) |
169 | 169 |
|
170 | 170 | if err != nil { |
171 | 171 | return 0, err |
|
0 commit comments