Home / Function/ getOperationDescription() — supabase Function Reference

getOperationDescription() — supabase Function Reference

Architecture documentation for the getOperationDescription() function in ExplainVisualizer.utils.ts from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/studio/components/interfaces/ExplainVisualizer/ExplainVisualizer.utils.ts lines 14–100

export function getOperationDescription(operation: string): string {
  const op = operation.toLowerCase()

  if (op.includes('seq scan')) {
    return 'Reads entire table row by row'
  }
  if (op.includes('index only scan')) {
    return 'Reads data directly from index (fastest)'
  }
  if (op.includes('bitmap index scan')) {
    return 'Builds bitmap of matching rows from index'
  }
  if (op.includes('bitmap heap scan')) {
    return 'Fetches rows using bitmap'
  }
  if (op.includes('index scan')) {
    return 'Uses index to find matching rows'
  }
  if (op.includes('hash left join')) {
    return 'Returns all left rows with matching right rows via hash'
  }
  if (op.includes('hash right join')) {
    return 'Returns all right rows with matching left rows via hash'
  }
  if (op.includes('hash full join')) {
    return 'Returns all rows from both tables via hash'
  }
  if (op.includes('hash anti join')) {
    return 'Returns rows without matches via hash'
  }
  if (op.includes('hash semi join')) {
    return 'Returns rows with at least one match via hash'
  }
  if (op.includes('hash join')) {
    return 'Joins tables using hash lookup'
  }
  if (op.includes('merge left join')) {
    return 'Returns all left rows with matching right rows via merge'
  }
  if (op.includes('merge right join')) {
    return 'Returns all right rows with matching left rows via merge'
  }
  if (op.includes('merge full join')) {
    return 'Returns all rows from both tables via merge'
  }
  if (op.includes('merge anti join')) {
    return 'Returns rows without matches via merge'
  }
  if (op.includes('merge semi join')) {
    return 'Returns rows with at least one match via merge'
  }
  if (op.includes('merge join')) {
    return 'Joins pre-sorted tables'
  }
  if (op.includes('nested loop left join')) {
    return 'Returns all left rows with matching right rows via loop'
  }
  if (op.includes('nested loop anti join')) {
    return 'Returns rows without matches via loop'
  }
  if (op.includes('nested loop semi join')) {
    return 'Returns rows with at least one match via loop'
  }
  if (op.includes('nested loop')) {
    return 'Joins by looping through each row'
  }
  if (op === 'hash') {
    return 'Builds hash table for fast lookups'
  }
  if (op.includes('sort')) {
    return 'Sorts rows for output or join'
  }
  if (op.includes('aggregate') || op.includes('group')) {
    return 'Groups rows and calculates aggregates'
  }
  if (op.includes('limit')) {
    return 'Returns only first N rows'
  }
  if (op.includes('materialize')) {
    return 'Stores results in memory for reuse'
  }
  if (op.includes('gather')) {
    return 'Collects results from parallel workers'
  }

  return ''
}

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free