borp: update to latest This pulls in a delection of the `Select*` functions.
diff --git a/go.mod b/go.mod index 3cd0bc4..c983ba3 100644 --- a/go.mod +++ b/go.mod
@@ -15,7 +15,7 @@ github.com/google/certificate-transparency-go v1.3.2-0.20250507091337-0eddb39e94f8 github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 github.com/jmhodges/clock v1.2.0 - github.com/letsencrypt/borp v0.0.0-20260428182343-7962eada420f + github.com/letsencrypt/borp v0.0.0-20260430223040-c0288adf3b53 github.com/letsencrypt/challtestsrv v1.4.2 github.com/letsencrypt/pkcs11key/v4 v4.0.1 github.com/letsencrypt/validator/v10 v10.0.0-20230215210743-a0c7dfc17158
diff --git a/go.sum b/go.sum index 7e9072f..152a3b7 100644 --- a/go.sum +++ b/go.sum
@@ -151,8 +151,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/letsencrypt/borp v0.0.0-20260428182343-7962eada420f h1:ka12vhO0JLDmdER25Wrzdp3fHNi2SpCoIEGOELIR2I0= -github.com/letsencrypt/borp v0.0.0-20260428182343-7962eada420f/go.mod h1:gMSMCNKhxox/ccR923EJsIvHeVVYfCABGbirqa0EwuM= +github.com/letsencrypt/borp v0.0.0-20260430223040-c0288adf3b53 h1:FJsPCIR6eflO22RhO3qkX4osHqH1c7OhgANkqmaVyNQ= +github.com/letsencrypt/borp v0.0.0-20260430223040-c0288adf3b53/go.mod h1:gMSMCNKhxox/ccR923EJsIvHeVVYfCABGbirqa0EwuM= github.com/letsencrypt/challtestsrv v1.4.2 h1:0ON3ldMhZyWlfVNYYpFuWRTmZNnyfiL9Hh5YzC3JVwU= github.com/letsencrypt/challtestsrv v1.4.2/go.mod h1:GhqMqcSoeGpYd5zX5TgwA6er/1MbWzx/o7yuuVya+Wk= github.com/letsencrypt/pkcs11key/v4 v4.0.1 h1:XIXFxOnQJS5QYBlMnHhnlOBVcfylh7m3fjOJmVcEV88=
diff --git a/vendor/github.com/letsencrypt/borp/db.go b/vendor/github.com/letsencrypt/borp/db.go index af5eed8..4e07588 100644 --- a/vendor/github.com/letsencrypt/borp/db.go +++ b/vendor/github.com/letsencrypt/borp/db.go
@@ -624,90 +624,6 @@ return maybeExpandNamedQueryAndExec(ctx, m, query, args...) } -// SelectInt is a convenience wrapper around the borp.SelectInt function -func (m *DbMap) SelectInt(ctx context.Context, query string, args ...interface{}) (int64, error) { - if m.ExpandSliceArgs { - expandSliceArgs(&query, args...) - } - - args, err := m.convertArgs(args...) - if err != nil { - return 0, err - } - - return SelectInt(ctx, m, query, args...) -} - -// SelectNullInt is a convenience wrapper around the borp.SelectNullInt function -func (m *DbMap) SelectNullInt(ctx context.Context, query string, args ...interface{}) (sql.NullInt64, error) { - if m.ExpandSliceArgs { - expandSliceArgs(&query, args...) - } - - args, err := m.convertArgs(args...) - if err != nil { - return sql.NullInt64{}, err - } - - return SelectNullInt(ctx, m, query, args...) -} - -// SelectFloat is a convenience wrapper around the borp.SelectFloat function -func (m *DbMap) SelectFloat(ctx context.Context, query string, args ...interface{}) (float64, error) { - if m.ExpandSliceArgs { - expandSliceArgs(&query, args...) - } - - args, err := m.convertArgs(args...) - if err != nil { - return 0, err - } - - return SelectFloat(ctx, m, query, args...) -} - -// SelectNullFloat is a convenience wrapper around the borp.SelectNullFloat function -func (m *DbMap) SelectNullFloat(ctx context.Context, query string, args ...interface{}) (sql.NullFloat64, error) { - if m.ExpandSliceArgs { - expandSliceArgs(&query, args...) - } - - args, err := m.convertArgs(args...) - if err != nil { - return sql.NullFloat64{}, err - } - - return SelectNullFloat(ctx, m, query, args...) -} - -// SelectStr is a convenience wrapper around the borp.SelectStr function -func (m *DbMap) SelectStr(ctx context.Context, query string, args ...interface{}) (string, error) { - if m.ExpandSliceArgs { - expandSliceArgs(&query, args...) - } - - args, err := m.convertArgs(args...) - if err != nil { - return "", err - } - - return SelectStr(ctx, m, query, args...) -} - -// SelectNullStr is a convenience wrapper around the borp.SelectNullStr function -func (m *DbMap) SelectNullStr(ctx context.Context, query string, args ...interface{}) (sql.NullString, error) { - if m.ExpandSliceArgs { - expandSliceArgs(&query, args...) - } - - args, err := m.convertArgs(args...) - if err != nil { - return sql.NullString{}, err - } - - return SelectNullStr(ctx, m, query, args...) -} - // SelectOne is a convenience wrapper around the borp.SelectOne function func (m *DbMap) SelectOne(ctx context.Context, holder interface{}, query string, args ...interface{}) error { if m.ExpandSliceArgs {
diff --git a/vendor/github.com/letsencrypt/borp/gorp.go b/vendor/github.com/letsencrypt/borp/gorp.go index 53741c6..f7d1b96 100644 --- a/vendor/github.com/letsencrypt/borp/gorp.go +++ b/vendor/github.com/letsencrypt/borp/gorp.go
@@ -70,12 +70,6 @@ Update(ctx context.Context, list ...interface{}) (int64, error) Delete(ctx context.Context, list ...interface{}) (int64, error) Select(ctx context.Context, i interface{}, query string, args ...interface{}) ([]interface{}, error) - SelectInt(ctx context.Context, query string, args ...interface{}) (int64, error) - SelectNullInt(ctx context.Context, query string, args ...interface{}) (sql.NullInt64, error) - SelectFloat(ctx context.Context, query string, args ...interface{}) (float64, error) - SelectNullFloat(ctx context.Context, query string, args ...interface{}) (sql.NullFloat64, error) - SelectStr(ctx context.Context, query string, args ...interface{}) (string, error) - SelectNullStr(ctx context.Context, query string, args ...interface{}) (sql.NullString, error) SelectOne(ctx context.Context, holder interface{}, query string, args ...interface{}) error // These method signatures are shared with *sql.DB.
diff --git a/vendor/github.com/letsencrypt/borp/select.go b/vendor/github.com/letsencrypt/borp/select.go index 4217fc7..3e6b075 100644 --- a/vendor/github.com/letsencrypt/borp/select.go +++ b/vendor/github.com/letsencrypt/borp/select.go
@@ -11,79 +11,6 @@ "reflect" ) -// SelectInt executes the given query, which should be a SELECT statement for a single -// integer column, and returns the value of the first row returned. If no rows are -// found, zero is returned. -func SelectInt(ctx context.Context, e SqlExecutor, query string, args ...interface{}) (int64, error) { - var h int64 - err := selectVal(ctx, e, &h, query, args...) - if err != nil && err != sql.ErrNoRows { - return 0, err - } - return h, nil -} - -// SelectNullInt executes the given query, which should be a SELECT statement for a single -// integer column, and returns the value of the first row returned. If no rows are -// found, the empty sql.NullInt64 value is returned. -func SelectNullInt(ctx context.Context, e SqlExecutor, query string, args ...interface{}) (sql.NullInt64, error) { - var h sql.NullInt64 - err := selectVal(ctx, e, &h, query, args...) - if err != nil && err != sql.ErrNoRows { - return h, err - } - return h, nil -} - -// SelectFloat executes the given query, which should be a SELECT statement for a single -// float column, and returns the value of the first row returned. If no rows are -// found, zero is returned. -func SelectFloat(ctx context.Context, e SqlExecutor, query string, args ...interface{}) (float64, error) { - var h float64 - err := selectVal(ctx, e, &h, query, args...) - if err != nil && err != sql.ErrNoRows { - return 0, err - } - return h, nil -} - -// SelectNullFloat executes the given query, which should be a SELECT statement for a single -// float column, and returns the value of the first row returned. If no rows are -// found, the empty sql.NullInt64 value is returned. -func SelectNullFloat(ctx context.Context, e SqlExecutor, query string, args ...interface{}) (sql.NullFloat64, error) { - var h sql.NullFloat64 - err := selectVal(ctx, e, &h, query, args...) - if err != nil && err != sql.ErrNoRows { - return h, err - } - return h, nil -} - -// SelectStr executes the given query, which should be a SELECT statement for a single -// char/varchar column, and returns the value of the first row returned. If no rows are -// found, an empty string is returned. -func SelectStr(ctx context.Context, e SqlExecutor, query string, args ...interface{}) (string, error) { - var h string - err := selectVal(ctx, e, &h, query, args...) - if err != nil && err != sql.ErrNoRows { - return "", err - } - return h, nil -} - -// SelectNullStr executes the given query, which should be a SELECT -// statement for a single char/varchar column, and returns the value -// of the first row returned. If no rows are found, the empty -// sql.NullString is returned. -func SelectNullStr(ctx context.Context, e SqlExecutor, query string, args ...interface{}) (sql.NullString, error) { - var h sql.NullString - err := selectVal(ctx, e, &h, query, args...) - if err != nil && err != sql.ErrNoRows { - return h, err - } - return h, nil -} - // SelectOne executes the given query (which should be a SELECT statement) // and binds the result to holder, which must be a pointer. //
diff --git a/vendor/github.com/letsencrypt/borp/transaction.go b/vendor/github.com/letsencrypt/borp/transaction.go index 33e2717..3b2c2f3 100644 --- a/vendor/github.com/letsencrypt/borp/transaction.go +++ b/vendor/github.com/letsencrypt/borp/transaction.go
@@ -77,90 +77,6 @@ return maybeExpandNamedQueryAndExec(ctx, t, query, args...) } -// SelectInt is a convenience wrapper around the borp.SelectInt function. -func (t *Transaction) SelectInt(ctx context.Context, query string, args ...interface{}) (int64, error) { - if t.dbmap.ExpandSliceArgs { - expandSliceArgs(&query, args...) - } - - args, err := t.dbmap.convertArgs(args...) - if err != nil { - return 0, err - } - - return SelectInt(ctx, t, query, args...) -} - -// SelectNullInt is a convenience wrapper around the borp.SelectNullInt function. -func (t *Transaction) SelectNullInt(ctx context.Context, query string, args ...interface{}) (sql.NullInt64, error) { - if t.dbmap.ExpandSliceArgs { - expandSliceArgs(&query, args...) - } - - args, err := t.dbmap.convertArgs(args...) - if err != nil { - return sql.NullInt64{}, err - } - - return SelectNullInt(ctx, t, query, args...) -} - -// SelectFloat is a convenience wrapper around the borp.SelectFloat function. -func (t *Transaction) SelectFloat(ctx context.Context, query string, args ...interface{}) (float64, error) { - if t.dbmap.ExpandSliceArgs { - expandSliceArgs(&query, args...) - } - - args, err := t.dbmap.convertArgs(args...) - if err != nil { - return 0, err - } - - return SelectFloat(ctx, t, query, args...) -} - -// SelectNullFloat is a convenience wrapper around the borp.SelectNullFloat function. -func (t *Transaction) SelectNullFloat(ctx context.Context, query string, args ...interface{}) (sql.NullFloat64, error) { - if t.dbmap.ExpandSliceArgs { - expandSliceArgs(&query, args...) - } - - args, err := t.dbmap.convertArgs(args...) - if err != nil { - return sql.NullFloat64{}, err - } - - return SelectNullFloat(ctx, t, query, args...) -} - -// SelectStr is a convenience wrapper around the borp.SelectStr function. -func (t *Transaction) SelectStr(ctx context.Context, query string, args ...interface{}) (string, error) { - if t.dbmap.ExpandSliceArgs { - expandSliceArgs(&query, args...) - } - - args, err := t.dbmap.convertArgs(args...) - if err != nil { - return "", err - } - - return SelectStr(ctx, t, query, args...) -} - -// SelectNullStr is a convenience wrapper around the borp.SelectNullStr function. -func (t *Transaction) SelectNullStr(ctx context.Context, query string, args ...interface{}) (sql.NullString, error) { - if t.dbmap.ExpandSliceArgs { - expandSliceArgs(&query, args...) - } - - args, err := t.dbmap.convertArgs(args...) - if err != nil { - return sql.NullString{}, err - } - - return SelectNullStr(ctx, t, query, args...) -} - // SelectOne is a convenience wrapper around the borp.SelectOne function. func (t *Transaction) SelectOne(ctx context.Context, holder interface{}, query string, args ...interface{}) error { if t.dbmap.ExpandSliceArgs {
diff --git a/vendor/modules.txt b/vendor/modules.txt index 8ca0528..7927806 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt
@@ -211,7 +211,7 @@ # github.com/jmhodges/clock v1.2.0 ## explicit; go 1.17 github.com/jmhodges/clock -# github.com/letsencrypt/borp v0.0.0-20260428182343-7962eada420f +# github.com/letsencrypt/borp v0.0.0-20260430223040-c0288adf3b53 ## explicit; go 1.20 github.com/letsencrypt/borp # github.com/letsencrypt/challtestsrv v1.4.2