@@ -35,6 +35,8 @@ const pathTypeToNodeType: Record<EPathType, NavigationTreeNodeType | undefined>
35
35
36
36
[ EPathType . EPathTypeExternalDataSource ] : 'external_data_source' ,
37
37
[ EPathType . EPathTypeExternalTable ] : 'external_table' ,
38
+
39
+ [ EPathType . EPathTypeView ] : 'view' ,
38
40
} ;
39
41
40
42
export const mapPathTypeToNavigationTreeType = (
@@ -67,8 +69,11 @@ const pathTypeToEntityName: Record<EPathType, string | undefined> = {
67
69
[ EPathType . EPathTypeColumnTable ] : 'Columntable' ,
68
70
[ EPathType . EPathTypeCdcStream ] : 'Changefeed' ,
69
71
[ EPathType . EPathTypePersQueueGroup ] : 'Topic' ,
72
+
70
73
[ EPathType . EPathTypeExternalDataSource ] : 'External Data Source' ,
71
74
[ EPathType . EPathTypeExternalTable ] : 'External Table' ,
75
+
76
+ [ EPathType . EPathTypeView ] : 'View' ,
72
77
} ;
73
78
74
79
export const mapPathTypeToEntityName = (
@@ -97,6 +102,8 @@ const pathTypeToIsTable: Record<EPathType, boolean> = {
97
102
98
103
[ EPathType . EPathTypeExternalTable ] : true ,
99
104
105
+ [ EPathType . EPathTypeView ] : true ,
106
+
100
107
[ EPathType . EPathTypeInvalid ] : false ,
101
108
[ EPathType . EPathTypeDir ] : false ,
102
109
[ EPathType . EPathTypeSubDomain ] : false ,
@@ -121,7 +128,7 @@ const pathSubTypeToIsIndexImpl: Record<EPathSubType, boolean> = {
121
128
[ EPathSubType . EPathSubTypeEmpty ] : false ,
122
129
} ;
123
130
124
- export const isIndexTable = ( subType ?: EPathSubType ) =>
131
+ export const isIndexTableType = ( subType ?: EPathSubType ) =>
125
132
( subType && pathSubTypeToIsIndexImpl [ subType ] ) ?? false ;
126
133
127
134
// ====================
@@ -138,8 +145,11 @@ const pathTypeToIsColumn: Record<EPathType, boolean> = {
138
145
[ EPathType . EPathTypeExtSubDomain ] : false ,
139
146
[ EPathType . EPathTypeCdcStream ] : false ,
140
147
[ EPathType . EPathTypePersQueueGroup ] : false ,
148
+
141
149
[ EPathType . EPathTypeExternalDataSource ] : false ,
142
150
[ EPathType . EPathTypeExternalTable ] : false ,
151
+
152
+ [ EPathType . EPathTypeView ] : false ,
143
153
} ;
144
154
145
155
export const isColumnEntityType = ( type ?: EPathType ) => ( type && pathTypeToIsColumn [ type ] ) ?? false ;
@@ -158,8 +168,11 @@ const pathTypeToIsDatabase: Record<EPathType, boolean> = {
158
168
[ EPathType . EPathTypeTableIndex ] : false ,
159
169
[ EPathType . EPathTypeCdcStream ] : false ,
160
170
[ EPathType . EPathTypePersQueueGroup ] : false ,
171
+
161
172
[ EPathType . EPathTypeExternalDataSource ] : false ,
162
173
[ EPathType . EPathTypeExternalTable ] : false ,
174
+
175
+ [ EPathType . EPathTypeView ] : false ,
163
176
} ;
164
177
165
178
export const isDatabaseEntityType = ( type ?: EPathType ) =>
@@ -183,8 +196,11 @@ const pathTypeToEntityWithMergedImplementation: Record<EPathType, boolean> = {
183
196
[ EPathType . EPathTypeSubDomain ] : false ,
184
197
[ EPathType . EPathTypeTableIndex ] : false ,
185
198
[ EPathType . EPathTypeExtSubDomain ] : false ,
199
+
186
200
[ EPathType . EPathTypeExternalDataSource ] : false ,
187
201
[ EPathType . EPathTypeExternalTable ] : false ,
202
+
203
+ [ EPathType . EPathTypeView ] : false ,
188
204
} ;
189
205
190
206
export const isEntityWithMergedImplementation = ( type ?: EPathType ) =>
@@ -207,6 +223,8 @@ const pathTypeToChildless: Record<EPathType, boolean> = {
207
223
[ EPathType . EPathTypeExternalDataSource ] : true ,
208
224
[ EPathType . EPathTypeExternalTable ] : true ,
209
225
226
+ [ EPathType . EPathTypeView ] : true ,
227
+
210
228
[ EPathType . EPathTypeInvalid ] : false ,
211
229
[ EPathType . EPathTypeColumnStore ] : false ,
212
230
[ EPathType . EPathTypeColumnTable ] : false ,
@@ -237,12 +255,15 @@ const mapPathTypeToIsWithTopic: Record<EPathType, boolean> = {
237
255
238
256
[ EPathType . EPathTypeExternalDataSource ] : false ,
239
257
[ EPathType . EPathTypeExternalTable ] : false ,
258
+
259
+ [ EPathType . EPathTypeView ] : false ,
240
260
} ;
241
261
242
262
export const isPathTypeWithTopic = ( type ?: EPathType ) =>
243
263
( type && mapPathTypeToIsWithTopic [ type ] ) ?? false ;
244
264
245
265
// ====================
246
266
247
- export const isExternalTable = ( type ?: EPathType ) => type === EPathType . EPathTypeExternalTable ;
248
- export const isRowTable = ( type ?: EPathType ) => type === EPathType . EPathTypeTable ;
267
+ export const isExternalTableType = ( type ?: EPathType ) => type === EPathType . EPathTypeExternalTable ;
268
+ export const isRowTableType = ( type ?: EPathType ) => type === EPathType . EPathTypeTable ;
269
+ export const isViewType = ( type ?: EPathType ) => type === EPathType . EPathTypeView ;
0 commit comments