From 1562e7b1f10ae920ece4c6006a75bb496dde93bc Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Mon, 20 May 2024 12:05:01 +0100 Subject: [PATCH] Working towards user relationship tests passing. --- packages/server/src/api/routes/tests/search.spec.ts | 2 +- packages/server/src/integrations/base/sql.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/routes/tests/search.spec.ts b/packages/server/src/api/routes/tests/search.spec.ts index f20e0534e5..f777eb6db1 100644 --- a/packages/server/src/api/routes/tests/search.spec.ts +++ b/packages/server/src/api/routes/tests/search.spec.ts @@ -406,7 +406,7 @@ describe.each([ ]) }) - it("should parse the encoded js binding. Return rows with appointments 2 weeks in the past", async () => { + it.only("should parse the encoded js binding. Return rows with appointments 2 weeks in the past", async () => { const jsBinding = "const currentTime = new Date()\ncurrentTime.setDate(currentTime.getDate()-14);\nreturn currentTime.toISOString();" const encodedBinding = encodeJSBinding(jsBinding) diff --git a/packages/server/src/integrations/base/sql.ts b/packages/server/src/integrations/base/sql.ts index 1140a1ac54..1c0c252b1c 100644 --- a/packages/server/src/integrations/base/sql.ts +++ b/packages/server/src/integrations/base/sql.ts @@ -272,7 +272,8 @@ class InternalBuilder { } statement += (statement ? andOr : "") + - `COALESCE(LOWER(${likeKey(this.client, key)}) LIKE ?, FALSE)` + // `COALESCE(LOWER(${likeKey(this.client, key)}) LIKE ?, FALSE)` + `LOWER(${likeKey(this.client, key)}) LIKE ?` } if (statement === "") {