MCPcopy Create free account
hub / github.com/bytebase/bytebase / countActiveVCSProviderUsersTx

Function countActiveVCSProviderUsersTx

backend/store/vcs_provider_user.go:135–141  ·  view source on GitHub ↗
(ctx context.Context, tx *sql.Tx, workspace string, activeWindow time.Duration)

Source from the content-addressed store, hash-verified

133}
134
135func countActiveVCSProviderUsersTx(ctx context.Context, tx *sql.Tx, workspace string, activeWindow time.Duration) (int, error) {
136 var count int
137 if err := tx.QueryRowContext(ctx, countActiveVCSProviderUsersSQL, workspace, activeWindow.Seconds()).Scan(&count); err != nil {
138 return 0, errors.Wrapf(err, "failed to count active VCS provider users")
139 }
140 return count, nil
141}
142
143// DeleteExpiredVCSProviderUsers deletes VCS provider users older than the active window.
144func (s *Store) DeleteExpiredVCSProviderUsers(ctx context.Context, activeWindow time.Duration) (int64, error) {

Callers 1

TouchVCSProviderUserMethod · 0.85

Calls 1

ScanMethod · 0.80

Tested by

no test coverage detected