Add distinct

This commit is contained in:
Fang-Pen Lin
2026-01-06 21:39:48 -08:00
parent 465a804ab6
commit 4a4849fac0

View File

@@ -90,7 +90,7 @@ export const identityAccessTokenDALFactory = (db: TDbClient) => {
// Notice: we broken down the query into multiple queries and union them to avoid index usage issues.
// each query got their own index for better performance, therefore, if you want to change
// the query, you need to update the indexes accordingly to avoid performance regressions.
return revokedTokensQuery.unionAll(exceededUsageLimitQuery).unionAll(expiredTTLQuery);
return revokedTokensQuery.unionAll(exceededUsageLimitQuery).unionAll(expiredTTLQuery).distinct();
};
do {