mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
feat(storage): read only transactions (#6417)
feat(storage): read only transactions for queries (#6415) * fix: tests * bastle wie en grosse * fix(database): scan as callback * fix tests * fix merge failures * remove as of system time * refactor: remove unused test * refacotr: remove unused lines
This commit is contained in:
@@ -60,12 +60,16 @@ func (q *Queries) AuthRequestByID(ctx context.Context, shouldTriggerBulk bool, i
|
||||
)
|
||||
|
||||
dst := new(AuthRequest)
|
||||
err = q.client.DB.QueryRowContext(
|
||||
ctx, q.authRequestByIDQuery(ctx),
|
||||
err = q.client.QueryRowContext(
|
||||
ctx,
|
||||
func(row *sql.Row) error {
|
||||
return row.Scan(
|
||||
&dst.ID, &dst.CreationDate, &dst.LoginClient, &dst.ClientID, &scope, &dst.RedirectURI,
|
||||
&prompt, &locales, &dst.LoginHint, &dst.MaxAge, &dst.HintUserID,
|
||||
)
|
||||
},
|
||||
q.authRequestByIDQuery(ctx),
|
||||
id, authz.GetInstance(ctx).InstanceID(),
|
||||
).Scan(
|
||||
&dst.ID, &dst.CreationDate, &dst.LoginClient, &dst.ClientID, &scope, &dst.RedirectURI,
|
||||
&prompt, &locales, &dst.LoginHint, &dst.MaxAge, &dst.HintUserID,
|
||||
)
|
||||
if errs.Is(err, sql.ErrNoRows) {
|
||||
return nil, errors.ThrowNotFound(err, "QUERY-Thee9", "Errors.AuthRequest.NotExisting")
|
||||
|
Reference in New Issue
Block a user