Files
Joshen Lim 54320ddb73 Chore/support showing all entities in database tables page (#27749)
* Support showing views in database tables page

* Support showing materialized views in database tables page

* Support showing foreign tables in database tables page

* Prevent deleting non table entities in database/tables, consistent with table editor

* Fix invalidation logic when deleting tables in database/tables
2024-07-03 14:40:45 +08:00

8 lines
397 B
TypeScript

export const foreignTableKeys = {
list: (projectRef: string | undefined) => ['projects', projectRef, 'foreignTables'] as const,
listBySchema: (projectRef: string | undefined, schema: string) =>
[...foreignTableKeys.list(projectRef), schema] as const,
foreignTable: (projectRef: string | undefined, id: number | undefined) =>
['projects', projectRef, 'foreignTables', id] as const,
}