mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? update pg changes documentation <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated the Realtime Postgres Changes guide with a new, generalized “Listening to specific events” section (including INSERT/UPDATE/DELETE/* examples) and standardized `event` usage. * Refreshed “Available filters” with a unified filter builder approach, expanded operator reference, consistent Filter-string/tab patterns, `not.` and `AND` guidance, and clearer limitations (including delete-event filtering). * Updated “Selecting specific columns” examples to match the latest payload/subscription guidance. * **Refactor** * Simplified the Realtime limits estimator by removing filter-based throughput inputs and related UI/table columns; throughput is now based on compute add-on, RLS, and concurrency. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import {
|
|
COMPUTE_LABELS,
|
|
THROUGHPUT_TABLE_HEADINGS,
|
|
} from '../../components/RealtimeLimitsEstimator/RealtimeLimitsEstimator.constants'
|
|
import throughputTable from '../../data/realtime/throughput.json'
|
|
|
|
type Row = {
|
|
computeAddOn: string
|
|
rls: boolean
|
|
concurrency: number
|
|
maxDBChanges: number
|
|
maxMessagesPerClient: number
|
|
totalMessagesPerSecond: number
|
|
p95Latency: number
|
|
}
|
|
|
|
const headerRow = `| ${THROUGHPUT_TABLE_HEADINGS.join(' | ')} |`
|
|
const dividerRow = `| ${THROUGHPUT_TABLE_HEADINGS.map(() => '---').join(' | ')} |`
|
|
|
|
const renderGroup = (computeAddOn: string): string => {
|
|
const rows = (throughputTable as Row[]).filter((l) => l.computeAddOn === computeAddOn)
|
|
return `#### ${COMPUTE_LABELS[computeAddOn] ?? computeAddOn}
|
|
|
|
${headerRow}
|
|
${dividerRow}
|
|
${rows
|
|
.map(
|
|
(l) =>
|
|
`| ${l.rls ? 'Yes' : 'No'} | ${l.concurrency.toLocaleString()} | ${l.maxDBChanges} | ${l.maxMessagesPerClient} | ${l.totalMessagesPerSecond.toLocaleString()} | ${l.p95Latency}ms |`
|
|
)
|
|
.join('\n')}`
|
|
}
|
|
|
|
export const RealtimeLimitsEstimator = (): string =>
|
|
[...new Set((throughputTable as Row[]).map((l) => l.computeAddOn))].map(renderGroup).join('\n\n')
|