queryInvolvesProtectedSchemas() — supabase Function Reference
Architecture documentation for the queryInvolvesProtectedSchemas() function in index-advisor.utils.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 6e7b031c_d72f_c376_fdd0_a519f4b1bb66["queryInvolvesProtectedSchemas()"] 8824adb1_743f_95b6_9f48_ece3e426ebcf["QueryPerformanceGrid()"] 8824adb1_743f_95b6_9f48_ece3e426ebcf -->|calls| 6e7b031c_d72f_c376_fdd0_a519f4b1bb66 1986cdbd_1b6f_c5c3_ad56_895d25013fca["transformStatementDataToRows()"] 1986cdbd_1b6f_c5c3_ad56_895d25013fca -->|calls| 6e7b031c_d72f_c376_fdd0_a519f4b1bb66 style 6e7b031c_d72f_c376_fdd0_a519f4b1bb66 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/studio/components/interfaces/QueryPerformance/IndexAdvisor/index-advisor.utils.ts lines 173–188
export function queryInvolvesProtectedSchemas(query: string | undefined | null): boolean {
if (!query) return false
const queryLower = query.toLowerCase()
// Check if the query references any protected schemas
// Match patterns like "schema.table", "FROM schema.table", "JOIN schema.table", etc.
return INTERNAL_SCHEMAS.some((schema) => {
// Match schema.table patterns (with or without quotes)
const schemaPattern = new RegExp(
`(?:from|join|update|insert\\s+into|delete\\s+from)\\s+(?:${schema}\\.|"${schema}"\\.)`,
'i'
)
return schemaPattern.test(queryLower)
})
}
Domain
Subdomains
Source
Frequently Asked Questions
What does queryInvolvesProtectedSchemas() do?
queryInvolvesProtectedSchemas() is a function in the supabase codebase.
What calls queryInvolvesProtectedSchemas()?
queryInvolvesProtectedSchemas() is called by 2 function(s): QueryPerformanceGrid, transformStatementDataToRows.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free