@@ -26,6 +26,9 @@ class TJsonAutocomplete : public TViewerPipeClient {
26
26
TString Name;
27
27
NKikimrViewer::EAutocompleteType Type;
28
28
TString Parent;
29
+ std::optional<ui32> PKIndex;
30
+ bool NotNull = false ;
31
+ TSysTables::TTableColumnInfo::EDefaultKind Default = TSysTables::TTableColumnInfo::EDefaultKind::DEFAULT_UNDEFINED;
29
32
30
33
TSchemaWordData (const TString& name, const NKikimrViewer::EAutocompleteType type, const TString& parent = {})
31
34
: Name(name)
@@ -241,7 +244,16 @@ class TJsonAutocomplete : public TViewerPipeClient {
241
244
}
242
245
TString path = JoinPath (entry.Path );
243
246
for (const auto & [id, column] : entry.Columns ) {
244
- Dictionary.emplace_back (column.Name , NKikimrViewer::column, path);
247
+ auto & dicColumn = Dictionary.emplace_back (column.Name , NKikimrViewer::column, path);
248
+ if (column.KeyOrder >= 0 ) {
249
+ dicColumn.PKIndex = column.KeyOrder ;
250
+ }
251
+ if (column.IsNotNullColumn ) {
252
+ dicColumn.NotNull = true ;
253
+ }
254
+ if (column.DefaultKind != TSysTables::TTableColumnInfo::DEFAULT_UNDEFINED) {
255
+ dicColumn.Default = column.DefaultKind ;
256
+ }
245
257
}
246
258
for (const auto & index : entry.Indexes ) {
247
259
Dictionary.emplace_back (index.GetName (), NKikimrViewer::index, path);
@@ -302,6 +314,15 @@ class TJsonAutocomplete : public TViewerPipeClient {
302
314
if (wordData->Parent ) {
303
315
entity->SetParent (wordData->Parent );
304
316
}
317
+ if (wordData->PKIndex ) {
318
+ entity->SetPKIndex (*wordData->PKIndex );
319
+ }
320
+ if (wordData->NotNull ) {
321
+ entity->SetNotNull (wordData->NotNull );
322
+ }
323
+ if (wordData->Default != TSysTables::TTableColumnInfo::DEFAULT_UNDEFINED) {
324
+ entity->SetDefault (static_cast <NKikimrViewer::TQueryAutocomplete_EDefaultKind>(wordData->Default ));
325
+ }
305
326
}
306
327
}
307
328
0 commit comments