Skip to content

Commit

Permalink
chore: synchronize workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Jun 7, 2024
1 parent 678a8a7 commit be7dd63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ALTER TABLE hydra_client ALTER PRIMARY KEY USING COLUMNS (id, nid) USING HASH WITH bucket_count=16;
ALTER TABLE hydra_client ALTER PRIMARY KEY USING COLUMNS (id, nid);
13 changes: 5 additions & 8 deletions persistence/sql/persister_consent.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (

"github.com/gobuffalo/pop/v6"
"github.com/gofrs/uuid"
"github.com/jmoiron/sqlx"
"github.com/pkg/errors"

"github.com/ory/fosite"
Expand Down Expand Up @@ -83,15 +82,13 @@ func (p *Persister) revokeConsentSession(whereStmt string, whereArgs ...interfac
}

count, err := c.RawQuery(
sqlx.Rebind(
sqlx.BindType(c.Dialect.Name()), fmt.Sprintf(
"DELETE FROM hydra_oauth2_flow WHERE nid = ? AND consent_challenge_id IN (%s)",
strings.Join(args, ", "),
),
fmt.Sprintf(
"DELETE FROM hydra_oauth2_flow WHERE consent_challenge_id IN (%s) AND nid = ? ",
strings.Join(args, ", "),
),
append(
[]interface{}{p.NetworkID(ctx)},
ids...,
ids,
p.NetworkID(ctx),
)...,
).ExecWithCount()
if errors.Is(err, sql.ErrNoRows) {
Expand Down

0 comments on commit be7dd63

Please sign in to comment.