diff --git a/plugins/catalog-backend/src/providers/DefaultLocationStore.ts b/plugins/catalog-backend/src/providers/DefaultLocationStore.ts index 3d48eb93d1..305bd611dc 100644 --- a/plugins/catalog-backend/src/providers/DefaultLocationStore.ts +++ b/plugins/catalog-backend/src/providers/DefaultLocationStore.ts @@ -543,7 +543,7 @@ export class DefaultLocationStore implements LocationStore, EntityProvider { * @remarks * * Design note: The code prefers to let the SQL engine achieve case - * insensitivitiy. We could attempt to use `.toUpperCase` etc on the client + * insensitivity. We could attempt to use `.toUpperCase` etc on the client * side, but that would only work for the values being passed in, not the column * side of the expression. If we let the database perform UPPER on both, we know * that they will always be locale consistent etc as well. @@ -628,17 +628,7 @@ function applyFilterValueToQuery( value: FilterPredicateValue, ): Knex.QueryBuilder { // Is it a primitive value? - if ( - typeof value === 'string' || - typeof value === 'number' || - typeof value === 'boolean' - ) { - // The id is matched with plain equality; it's of UUID type and case - // insensitivity does not apply. - if (key === 'id') { - return result.where({ id: value }); - } - + if (['string', 'number', 'boolean'].includes(typeof value)) { if (clientType === 'pg') { return result.whereRaw(`UPPER(??::text) = UPPER(?::text)`, [key, value]); } diff --git a/plugins/catalog-backend/src/providers/GenericScmEventRefreshProvider.test.ts b/plugins/catalog-backend/src/providers/GenericScmEventRefreshProvider.test.ts index 8c74f350bb..bef8d1555d 100644 --- a/plugins/catalog-backend/src/providers/GenericScmEventRefreshProvider.test.ts +++ b/plugins/catalog-backend/src/providers/GenericScmEventRefreshProvider.test.ts @@ -29,6 +29,8 @@ import { } from '../database/tables'; import { GenericScmEventRefreshProvider } from './GenericScmEventRefreshProvider'; +jest.setTimeout(60_000); + describe('GenericScmEventRefreshProvider', () => { const databases = TestDatabases.create(); diff --git a/plugins/catalog-node/report.api.md b/plugins/catalog-node/report.api.md index 24b4410a9d..0c27645796 100644 --- a/plugins/catalog-node/report.api.md +++ b/plugins/catalog-node/report.api.md @@ -238,7 +238,7 @@ export interface CatalogService { ): Promise; // (undocumented) queryLocations( - request: QueryLocationsRequest, + request: QueryLocationsRequest | undefined, options: CatalogServiceRequestOptions, ): Promise; // (undocumented) diff --git a/plugins/catalog-node/src/catalogService.ts b/plugins/catalog-node/src/catalogService.ts index 4f4fd6d764..be9616d7f6 100644 --- a/plugins/catalog-node/src/catalogService.ts +++ b/plugins/catalog-node/src/catalogService.ts @@ -111,7 +111,7 @@ export interface CatalogService { ): Promise; queryLocations( - request: QueryLocationsRequest, + request: QueryLocationsRequest | undefined, options: CatalogServiceRequestOptions, ): Promise;