more refactors :)

This commit is contained in:
2026-02-08 20:52:58 +11:00
parent 97342e08fe
commit 24733098b4
10 changed files with 28 additions and 50 deletions

View File

@@ -35,7 +35,7 @@ func (g *fieldgetter[T]) get(ctx context.Context) (*T, error) {
Where("? = ?", bun.Ident(g.field), g.value).
Scan(ctx, model)
if err != nil {
if err == sql.ErrNoRows {
if errors.Is(err, sql.ErrNoRows) {
return nil, nil
}
return nil, errors.Wrap(err, "bun.SelectQuery.Scan")