Skip to content

Add Tx.NamedQueryContext (upstream #724). - #21

Merged
avgvi merged 3 commits into
masterfrom
feat/447-tx-named-query-context
Oct 11, 2026
Merged

avgvi merged 3 commits into
masterfrom
feat/447-tx-named-query-context

Conversation

@avgvi

@avgvi avgvi commented Oct 11, 2026

Copy link
Copy Markdown
Member

Merges upstream jmoiron/sqlx#724 by Dave Worth with its original commit: Tx.NamedQueryContext, the context twin of Tx.NamedQuery, with its test in TestUsageContext. Closes upstream #447 (39 reactions; duplicates #348, #373, #565, #941).

A follow-up commit takes the two qStmt methods from #941 by Jon Senchyna, QueryRow and QueryRowContext, on the unexported prepared-statement queryer where they belong. #941 itself is not merged: it put QueryRowContext on *Stmt, which shadows the promoted (*sql.Stmt).QueryRowContext and silently drops the first argument, and it widened Queryer and QueryerContext, a compile break for every external implementor. The interfaces stay unchanged here; a guard test keeps the promoted methods working.

Local run with Postgres 16, MySQL 8.4 and SQLite: 88 pass, 3 skip, 0 fail.

daveworth and others added 3 commits April 14, 2021 10:10
This change adds the NamedQueryContext method on Transactions to match
calls on the Database directly.  This allows the use of `DB` and `Tx`
objects more interchangeably in consuming codebases.
…rom upstream #941) and guard the promoted Stmt methods.
@avgvi
avgvi merged commit 31cc421 into master Oct 11, 2026
6 checks passed
@avgvi
avgvi deleted the feat/447-tx-named-query-context branch October 11, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants