Skip to content

Commit 8d8cddb

Browse files
authored
fix: operator 'or' and escape character not working (#6705) (#6708)
1 parent 79b0c90 commit 8d8cddb

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

packages/supabase/src/utils/generateFilter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const generateFilter = (filter: CrudFilter, query: any) => {
6060
}
6161

6262
if (item.operator === "contains" || item.operator === "containss") {
63-
value = `%${value}%`;
63+
value = `"%${value}%"`;
6464
}
6565

6666
if (item.operator === "startswith") {

packages/supabase/test/getList/index.mock.ts

+14-12
Original file line numberDiff line numberDiff line change
@@ -2008,7 +2008,7 @@ nock("https://iwdfzvfqbtokqetmbmbp.supabase.co:443", {
20082008
select: "%2A",
20092009
offset: "0",
20102010
limit: "10",
2011-
or: "%28title.ilike.%25Black+Psorotichia%25%2Ccontent.ilike.%25Sed+sagittis%25%29",
2011+
or: "%28title.ilike.%22%25Black%20Psorotichia%25%22%2Ccontent.ilike.%22%25Sed%20sagittis%25%22%29",
20122012
})
20132013
.reply(
20142014
200,
@@ -2036,7 +2036,7 @@ nock("https://iwdfzvfqbtokqetmbmbp.supabase.co:443", {
20362036
],
20372037
[
20382038
"Date",
2039-
"Thu, 25 Apr 2024 07:26:59 GMT",
2039+
"Mon, 17 Mar 2025 10:29:52 GMT",
20402040
"Content-Type",
20412041
"application/json; charset=utf-8",
20422042
"Transfer-Encoding",
@@ -2046,27 +2046,29 @@ nock("https://iwdfzvfqbtokqetmbmbp.supabase.co:443", {
20462046
"Content-Range",
20472047
"0-1/2",
20482048
"CF-Ray",
2049-
"879c9ba35d5b68ae-IST",
2049+
"921bcfca7bad925f-FRA",
20502050
"CF-Cache-Status",
20512051
"DYNAMIC",
2052-
"Access-Control-Allow-Origin",
2053-
"*",
20542052
"Content-Location",
2055-
"/posts?limit=10&offset=0&or=%28title.ilike.%25Black+Psorotichia%25%2Ccontent.ilike.%25Sed+sagittis%25%29&select=%2A",
2053+
"/posts?limit=10&offset=0&or=%28title.ilike.%22%25Black%20Psorotichia%25%22%2Ccontent.ilike.%22%25Sed%20sagittis%25%22%29&select=%2A",
20562054
"Strict-Transport-Security",
2057-
"max-age=15552000; includeSubDomains",
2055+
"max-age=31536000; includeSubDomains; preload",
20582056
"Vary",
20592057
"Accept-Encoding",
2060-
"Via",
2061-
"kong/2.8.1",
20622058
"content-profile",
20632059
"public",
2060+
"preference-applied",
2061+
"count=exact",
20642062
"sb-gateway-version",
20652063
"1",
2066-
"x-kong-proxy-latency",
2064+
"sb-project-ref",
2065+
"iwdfzvfqbtokqetmbmbp",
2066+
"X-Content-Type-Options",
2067+
"nosniff",
2068+
"x-envoy-attempt-count",
20672069
"1",
2068-
"x-kong-upstream-latency",
2069-
"3",
2070+
"x-envoy-upstream-service-time",
2071+
"18",
20702072
"Server",
20712073
"cloudflare",
20722074
"alt-svc",

0 commit comments

Comments
 (0)