multi: use sqldb.NoOpReset helper

Define a re-usable "reset" function, sqldb.NoOpReset, that can be used
for the reset parameter in sql ExecTx calls.
This commit is contained in:
Elle Mouton
2025-05-27 18:59:44 +02:00
parent c4e6f23c5b
commit 9cbc1f804e
5 changed files with 19 additions and 15 deletions

View File

@ -7,6 +7,10 @@ import (
"golang.org/x/exp/constraints"
)
// NoOpReset is a no-op function that can be used as a default
// reset function ExecTx calls.
var NoOpReset = func() {}
// SQLInt32 turns a numerical integer type into the NullInt32 that sql/sqlc
// uses when an integer field can be permitted to be NULL.
//