even more

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2026-02-14 21:58:06 +01:00
parent 8aa6c513d8
commit d038038fb2
4 changed files with 6 additions and 14 deletions
@@ -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]);
}
@@ -29,6 +29,8 @@ import {
} from '../database/tables';
import { GenericScmEventRefreshProvider } from './GenericScmEventRefreshProvider';
jest.setTimeout(60_000);
describe('GenericScmEventRefreshProvider', () => {
const databases = TestDatabases.create();
+1 -1
View File
@@ -238,7 +238,7 @@ export interface CatalogService {
): Promise<QueryEntitiesResponse>;
// (undocumented)
queryLocations(
request: QueryLocationsRequest,
request: QueryLocationsRequest | undefined,
options: CatalogServiceRequestOptions,
): Promise<QueryLocationsResponse>;
// (undocumented)
+1 -1
View File
@@ -111,7 +111,7 @@ export interface CatalogService {
): Promise<GetLocationsResponse>;
queryLocations(
request: QueryLocationsRequest,
request: QueryLocationsRequest | undefined,
options: CatalogServiceRequestOptions,
): Promise<QueryLocationsResponse>;