useQueryPerformanceSort() — supabase Function Reference
Architecture documentation for the useQueryPerformanceSort() function in useQueryPerformanceSort.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 5af4f2f6_f3e7_a9fe_5ce8_d8772a148f51["useQueryPerformanceSort()"] 1e358271_8ad9_1b2c_7ca2_5dc1d64bd29a["QueryPerformanceFilterBar()"] 1e358271_8ad9_1b2c_7ca2_5dc1d64bd29a -->|calls| 5af4f2f6_f3e7_a9fe_5ce8_d8772a148f51 8824adb1_743f_95b6_9f48_ece3e426ebcf["QueryPerformanceGrid()"] 8824adb1_743f_95b6_9f48_ece3e426ebcf -->|calls| 5af4f2f6_f3e7_a9fe_5ce8_d8772a148f51 style 5af4f2f6_f3e7_a9fe_5ce8_d8772a148f51 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/studio/components/interfaces/QueryPerformance/hooks/useQueryPerformanceSort.ts lines 4–28
export const useQueryPerformanceSort = () => {
const [{ sort, order }, setQueryStates] = useQueryStates({
sort: parseAsString,
order: parseAsString,
})
const setSortConfig = (column: string, order: 'asc' | 'desc') => {
setQueryStates({ sort: column, order })
}
const clearSort = () => {
setQueryStates({ sort: null, order: null })
}
const sortConfig: QueryPerformanceSort | null =
sort && order && ['asc', 'desc'].includes(order)
? { column: sort as QueryPerformanceSort['column'], order: order as 'asc' | 'desc' }
: null
return {
sort: sortConfig,
setSortConfig,
clearSort,
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does useQueryPerformanceSort() do?
useQueryPerformanceSort() is a function in the supabase codebase.
What calls useQueryPerformanceSort()?
useQueryPerformanceSort() is called by 2 function(s): QueryPerformanceFilterBar, QueryPerformanceGrid.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free