mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
Bug fix & feature
## What is the current behavior?
Customers with large schemas have trouble running:
pg-meta/{ref}/tables?include_columns=false
## What is the new behavior?
In the webhooks view some users with large schemas could not click a
table name as the underlying query times out. This just adds a light
weight query and fetches the table name
## Additional context
Add any other context or screenshots.
## Summary by CodeRabbit
* **Refactor**
* Optimized table name fetching in the database interface by introducing
an enhanced query mechanism that streams table metadata more efficiently
from the database.
14 lines
580 B
TypeScript
14 lines
580 B
TypeScript
export const tableKeys = {
|
|
names: (projectRef: string | undefined) => ['projects', projectRef, 'table-names'] as const,
|
|
list: (projectRef: string | undefined, schema?: string, includeColumns?: boolean) =>
|
|
['projects', projectRef, 'tables', schema, includeColumns].filter(Boolean),
|
|
retrieve: (projectRef: string | undefined, name: string, schema: string) =>
|
|
['projects', projectRef, 'table', schema, name].filter(Boolean),
|
|
rolesAccess: (projectRef: string | undefined, schema: string) => [
|
|
'projects',
|
|
projectRef,
|
|
'roles-access',
|
|
{ schema },
|
|
],
|
|
}
|