Allow loading partition tables (#23199)

This commit is contained in:
Terry Sutton authored and GitHub committed 2024-04-29 10:24:09 -02:30
1 parent a5e527d018
commit f2fc280270
1 file changed
+13
+13
View File
@@ -29,6 +29,17 @@ function useTable(id?: number) {
}
)
const partitionTableResult = useTableQuery(
{
projectRef: project?.ref,
connectionString: project?.connectionString,
id: entity?.id,
},
{
enabled: entity?.type === ENTITY_TYPE.PARTITIONED_TABLE,
}
)
const viewResult = useViewQuery(
{
projectRef: project?.ref,
@@ -65,6 +76,8 @@ function useTable(id?: number) {
switch (entity?.type) {
case ENTITY_TYPE.TABLE:
return tableResult
case ENTITY_TYPE.PARTITIONED_TABLE:
return partitionTableResult
case ENTITY_TYPE.VIEW:
return viewResult
case ENTITY_TYPE.MATERIALIZED_VIEW: