Files
threshold/internal/auth/oidc/query.go
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
589 B
Go
Raw Normal View History

2023-02-02 17:15:17 -08:00
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
2021-04-08 20:54:32 -04:00
package oidc
const (
acctUpsertQuery = `
2021-06-01 14:18:10 -05:00
insert into auth_oidc_account
2021-04-08 20:54:32 -04:00
(%s)
2021-06-01 14:18:10 -05:00
values
2021-04-08 20:54:32 -04:00
(%s)
2021-06-01 14:18:10 -05:00
on conflict on constraint
2021-04-08 20:54:32 -04:00
auth_oidc_account_auth_method_id_issuer_subject_uq
2021-06-01 14:18:10 -05:00
do update set
2021-04-08 20:54:32 -04:00
%s
2021-06-01 14:18:10 -05:00
returning public_id, version
`
2023-12-21 20:43:52 -08:00
estimateCountAccounts = `
select sum(reltuples::bigint) as estimate from pg_class where oid in ('auth_oidc_account'::regclass)
`
2024-01-03 14:35:54 -05:00
estimateCountManagedGroups = `
select sum(reltuples::bigint) as estimate from pg_class where oid in ('auth_oidc_managed_group'::regclass)
`
2021-04-08 20:54:32 -04:00
)