getIntervalTrunc() — supabase Function Reference
Architecture documentation for the getIntervalTrunc() function in usePostgrestOverviewMetrics.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD d2281748_00a6_1157_2ba1_8dbd0555251b["getIntervalTrunc()"] 5c02c7e2_18a6_6171_f224_f01a64e652a6["POSTGREST_METRICS_SQL()"] 5c02c7e2_18a6_6171_f224_f01a64e652a6 -->|calls| d2281748_00a6_1157_2ba1_8dbd0555251b style d2281748_00a6_1157_2ba1_8dbd0555251b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/studio/components/interfaces/Observability/usePostgrestOverviewMetrics.ts lines 13–24
const getIntervalTrunc = (interval: '1hr' | '1day' | '7day') => {
switch (interval) {
case '1hr':
return 'minute' // 1-minute buckets for 1 hour
case '1day':
return 'hour' // 1-hour buckets for 1 day
case '7day':
return 'day' // 1-day buckets for 7 days
default:
return 'hour'
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does getIntervalTrunc() do?
getIntervalTrunc() is a function in the supabase codebase.
What calls getIntervalTrunc()?
getIntervalTrunc() is called by 1 function(s): POSTGREST_METRICS_SQL.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free