mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
chore: use pgx v5 (#7577)
* chore: use pgx v5 * chore: update go version * remove direct pq dependency * remove unnecessary type * scan test * map scanner * converter * uint8 number array * duration * most unit tests work * unit tests work * chore: coverage * go 1.21 * linting * int64 gopfertammi * retry go 1.22 * retry go 1.22 * revert to go v1.21.5 * update go toolchain to 1.21.8 * go 1.21.8 * remove test flag * go 1.21.5 * linting * update toolchain * use correct array * use correct array * add byte array * correct value * correct error message * go 1.21 compatible
This commit is contained in:
@@ -92,7 +92,7 @@ func prepareQuotaQuery(ctx context.Context, db prepareDatabase) (sq.SelectBuilde
|
||||
From(quotasTable.identifier()).
|
||||
PlaceholderFormat(sq.Dollar), func(row *sql.Row) (*Quota, error) {
|
||||
q := new(Quota)
|
||||
var interval database.Duration
|
||||
var interval database.NullDuration
|
||||
var now time.Time
|
||||
err := row.Scan(&q.ID, &q.From, &interval, &q.Amount, &q.Limit, &now)
|
||||
if err != nil {
|
||||
@@ -101,7 +101,7 @@ func prepareQuotaQuery(ctx context.Context, db prepareDatabase) (sq.SelectBuilde
|
||||
}
|
||||
return nil, zerrors.ThrowInternal(err, "QUERY-LqySK", "Errors.Internal")
|
||||
}
|
||||
q.ResetInterval = time.Duration(interval)
|
||||
q.ResetInterval = interval.Duration
|
||||
q.CurrentPeriodStart = pushPeriodStart(q.From, q.ResetInterval, now)
|
||||
return q, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user