mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 07:09:07 +03:00
* chore: remove useExecuteSqlQuery part 1
* fix invalidation
* fixes
* more fixes
* I fixed it, but tested on preview instead of local 🤦🏻
* only refetch table rows and not count on row updates
* removed unneeded invalidations and prefetched new table after create
22 lines
1.3 KiB
TypeScript
22 lines
1.3 KiB
TypeScript
import { SupportedAssistantEntities } from 'components/ui/AIAssistantPanel/AIAssistant.types'
|
|
|
|
export const databaseKeys = {
|
|
entityDefinition: (projectRef: string | undefined, id?: number) =>
|
|
['projects', projectRef, 'entity-definition', id] as const,
|
|
entityDefinitions: (projectRef: string | undefined, schemas: string[]) =>
|
|
['projects', projectRef, 'entity-definitions', schemas] as const,
|
|
tableDefinition: (projectRef: string | undefined, id?: number) =>
|
|
['projects', projectRef, 'table-definition', id] as const,
|
|
viewDefinition: (projectRef: string | undefined, id?: number) =>
|
|
['projects', projectRef, 'view-definition', id] as const,
|
|
backups: (projectRef: string | undefined) => [projectRef, 'database', 'backups'] as const,
|
|
poolingConfiguration: (projectRef: string | undefined) =>
|
|
[projectRef, 'database', 'pooling-configuration'] as const,
|
|
indexesFromQuery: (projectRef: string | undefined, query: string) =>
|
|
['projects', projectRef, 'indexes', { query }] as const,
|
|
indexAdvisorFromQuery: (projectRef: string | undefined, query: string) =>
|
|
['projects', projectRef, 'index-advisor', { query }] as const,
|
|
tableConstraints: (projectRef: string | undefined, id?: number) =>
|
|
['projects', projectRef, 'table-constraints', id] as const,
|
|
}
|