@@ -26,6 +26,9 @@ class TJsonAutocomplete : public TViewerPipeClient {
2626 TString Name;
2727 NKikimrViewer::EAutocompleteType Type;
2828 TString Parent;
29+ std::optional<ui32> PKIndex;
30+ bool NotNull = false ;
31+ TSysTables::TTableColumnInfo::EDefaultKind Default = TSysTables::TTableColumnInfo::EDefaultKind::DEFAULT_UNDEFINED;
2932
3033 TSchemaWordData (const TString& name, const NKikimrViewer::EAutocompleteType type, const TString& parent = {})
3134 : Name(name)
@@ -241,7 +244,16 @@ class TJsonAutocomplete : public TViewerPipeClient {
241244 }
242245 TString path = JoinPath (entry.Path );
243246 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+ }
245257 }
246258 for (const auto & index : entry.Indexes ) {
247259 Dictionary.emplace_back (index.GetName (), NKikimrViewer::index, path);
@@ -302,6 +314,15 @@ class TJsonAutocomplete : public TViewerPipeClient {
302314 if (wordData->Parent ) {
303315 entity->SetParent (wordData->Parent );
304316 }
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+ }
305326 }
306327 }
307328
0 commit comments