From 5fc3917f21b50b0dc157f1ce00cbd6a1cb74fc9b Mon Sep 17 00:00:00 2001 From: Tyler Marshall Date: Fri, 6 Jun 2025 11:40:01 -0700 Subject: [PATCH] fix: adds important callout for sql.raw Refs: https://github.com/drizzle-team/drizzle-orm-docs/issues/564 --- src/content/docs/rls.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/content/docs/rls.mdx b/src/content/docs/rls.mdx index cb5cfd811..136017ae8 100644 --- a/src/content/docs/rls.mdx +++ b/src/content/docs/rls.mdx @@ -449,6 +449,10 @@ In upcoming releases, it will be moved to drizzle-orm/supabase, allowing you to Please check [Drizzle SupaSecureSlack repo](https://github.com/rphlmr/drizzle-supabase-rls) Here is an example of an implementation from this repository + +If you are using `sql.raw` you must escape any special characters such as quotes, double quotes, etc. + + ```ts type SupabaseToken = { iss?: string; @@ -512,4 +516,4 @@ async function getRooms() { const db = await createDrizzleSupabaseClient(); return db.rls((tx) => tx.select().from(rooms)); } -``` \ No newline at end of file +```