Home / Function/ purgeOldPages() — supabase Function Reference

purgeOldPages() — supabase Function Reference

Architecture documentation for the purgeOldPages() function in generate-embeddings.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  bbb7258c_2e63_dc75_3f7f_ea1f0e42eb17["purgeOldPages()"]
  b280bae5_b0f6_6775_91cb_d0697bd4d074["generateEmbeddings()"]
  b280bae5_b0f6_6775_91cb_d0697bd4d074 -->|calls| bbb7258c_2e63_dc75_3f7f_ea1f0e42eb17
  style bbb7258c_2e63_dc75_3f7f_ea1f0e42eb17 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/scripts/search/generate-embeddings.ts lines 574–585

async function purgeOldPages(
  supabaseClient: SupabaseClient,
  pageTable: string,
  refreshVersion: string
) {
  console.log(`Removing old pages and their sections`)
  const { error: deletePageError } = await supabaseClient
    .from(pageTable)
    .delete()
    .filter('version', 'neq', refreshVersion)
  if (deletePageError) throw deletePageError
}

Subdomains

Frequently Asked Questions

What does purgeOldPages() do?
purgeOldPages() is a function in the supabase codebase.
What calls purgeOldPages()?
purgeOldPages() is called by 1 function(s): generateEmbeddings.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free