feat(meta-info): чтение внешних источников данных

На источнике и его таблице навык печатал только заголовок и строку поддержки: вида он не
знал, а универсальный блок «Реквизиты» ищет <Attribute>, тогда как у таблицы поля — <Field>.

Источник показывает режим блокировки, список таблиц и функции с выражением и типом результата.
Таблица — вид (таблица/выражение), имя или выражение в источнике, объектность, признак «только
чтение», ссылки на поля (ключ, представление, родитель, версия данных, ввод по строке) короткими
именами, и список полей. У поля отмечается имя колонки в источнике, если оно отличается от имени
поля, а также «только чтение» и допустимость NULL.

Заодно два типа перестали печататься сырыми: xs:base64Binary → ДвоичныеДанные (касается всех
объектов, не только внешних источников) и ExternalDataSourceTableRef → русское имя, как у прочих
ссылочных типов.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NBsZA5cr2WFThtgp7i5WVi
This commit is contained in:
Nick Shirokov
2026-09-05 21:17:36 +03:00
co-authored by Claude Opus 5
parent 97c8478382
commit bb56a7e898
14 changed files with 1400 additions and 2 deletions
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.17">
<ExternalDataSource uuid="UUID-001">
<InternalInfo>
<xr:GeneratedType name="ExternalDataSourceManager.PG" category="Manager">
<xr:TypeId>UUID-002</xr:TypeId>
<xr:ValueId>UUID-003</xr:ValueId>
</xr:GeneratedType>
<xr:GeneratedType name="ExternalDataSourceTablesManager.PG" category="TablesManager">
<xr:TypeId>UUID-004</xr:TypeId>
<xr:ValueId>UUID-005</xr:ValueId>
</xr:GeneratedType>
<xr:GeneratedType name="ExternalDataSourceCubesManager.PG" category="CubesManager">
<xr:TypeId>UUID-006</xr:TypeId>
<xr:ValueId>UUID-007</xr:ValueId>
</xr:GeneratedType>
</InternalInfo>
<Properties>
<Name>PG</Name>
<Synonym>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>PG</v8:content>
</v8:item>
</Synonym>
<Comment/>
<DataLockControlMode>AutomaticAndManaged</DataLockControlMode>
</Properties>
<ChildObjects>
<Table>products</Table>
<Function uuid="UUID-008">
<Properties>
<Name>total</Name>
<Synonym/>
<Comment/>
<ReturnValue>true</ReturnValue>
<Type>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>15</v8:Digits>
<v8:FractionDigits>2</v8:FractionDigits>
<v8:AllowedSign>Any</v8:AllowedSign>
</v8:NumberQualifiers>
</Type>
<ExpressionInDataSource>public.f_total(&amp;1, &amp;2)</ExpressionInDataSource>
</Properties>
</Function>
</ChildObjects>
</ExternalDataSource>
</MetaDataObject>
@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.17">
<Table uuid="UUID-001">
<InternalInfo>
<xr:GeneratedType name="ExternalDataSourceTableManager.PG.products" category="Manager">
<xr:TypeId>UUID-002</xr:TypeId>
<xr:ValueId>UUID-003</xr:ValueId>
</xr:GeneratedType>
<xr:GeneratedType name="ExternalDataSourceTableObject.PG.products" category="Object">
<xr:TypeId>UUID-004</xr:TypeId>
<xr:ValueId>UUID-005</xr:ValueId>
</xr:GeneratedType>
<xr:GeneratedType name="ExternalDataSourceTableRef.PG.products" category="Ref">
<xr:TypeId>UUID-006</xr:TypeId>
<xr:ValueId>UUID-007</xr:ValueId>
</xr:GeneratedType>
<xr:GeneratedType name="ExternalDataSourceTableList.PG.products" category="List">
<xr:TypeId>UUID-008</xr:TypeId>
<xr:ValueId>UUID-009</xr:ValueId>
</xr:GeneratedType>
<xr:GeneratedType name="ExternalDataSourceTableRecord.PG.products" category="Record">
<xr:TypeId>UUID-010</xr:TypeId>
<xr:ValueId>UUID-011</xr:ValueId>
</xr:GeneratedType>
<xr:GeneratedType name="ExternalDataSourceTableRecordSet.PG.products" category="RecordSet">
<xr:TypeId>UUID-012</xr:TypeId>
<xr:ValueId>UUID-013</xr:ValueId>
</xr:GeneratedType>
<xr:GeneratedType name="ExternalDataSourceTableRecordKey.PG.products" category="RecordKey">
<xr:TypeId>UUID-014</xr:TypeId>
<xr:ValueId>UUID-015</xr:ValueId>
</xr:GeneratedType>
<xr:GeneratedType name="ExternalDataSourceTableRecordManager.PG.products" category="RecordManager">
<xr:TypeId>UUID-016</xr:TypeId>
<xr:ValueId>UUID-017</xr:ValueId>
</xr:GeneratedType>
</InternalInfo>
<Properties>
<Name>products</Name>
<Synonym>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>products</v8:content>
</v8:item>
</Synonym>
<Comment/>
<TableType>Table</TableType>
<NameInDataSource>eds.public.products</NameInDataSource>
<ExpressionInDataSource/>
<TableDataType>ObjectData</TableDataType>
<KeyFields>
<xr:Field>ExternalDataSource.PG.Table.products.Field.id</xr:Field>
</KeyFields>
<PresentationField>ExternalDataSource.PG.Table.products.Field.name</PresentationField>
<ParentField/>
<UnfilledParentValue xsi:nil="true"/>
<Characteristics/>
<UseStandardCommands>true</UseStandardCommands>
<QuickChoice>false</QuickChoice>
<InputByString>
<xr:Field>ExternalDataSource.PG.Table.products.Field.name</xr:Field>
</InputByString>
<CreateOnInput>Auto</CreateOnInput>
<SearchStringModeOnInputByString>Begin</SearchStringModeOnInputByString>
<ChoiceDataGetModeOnInputByString>Directly</ChoiceDataGetModeOnInputByString>
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
<DefaultObjectForm/>
<DefaultRecordForm/>
<DefaultListForm/>
<DefaultChoiceForm/>
<ObjectPresentation/>
<ExtendedObjectPresentation/>
<RecordPresentation/>
<ExtendedRecordPresentation/>
<ListPresentation/>
<ExtendedListPresentation/>
<Explanation/>
<IncludeHelpInContents>false</IncludeHelpInContents>
<ReadOnly>false</ReadOnly>
<TransactionsIsolationLevel>Auto</TransactionsIsolationLevel>
<DataVersionField/>
<EditType>InDialog</EditType>
<BasedOn/>
<DataLockFields/>
<DataLockControlMode>Automatic</DataLockControlMode>
</Properties>
<ChildObjects>
<Field uuid="UUID-018">
<Properties>
<Name>id</Name>
<Synonym>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>id</v8:content>
</v8:item>
</Synonym>
<Comment/>
<Type>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>10</v8:Digits>
<v8:FractionDigits>0</v8:FractionDigits>
<v8:AllowedSign>Any</v8:AllowedSign>
</v8:NumberQualifiers>
</Type>
<PasswordMode>false</PasswordMode>
<Format/>
<EditFormat/>
<ToolTip/>
<MarkNegatives>false</MarkNegatives>
<Mask/>
<MultiLine>false</MultiLine>
<ExtendedEdit>false</ExtendedEdit>
<MinValue xsi:nil="true"/>
<MaxValue xsi:nil="true"/>
<FillFromFillingValue>false</FillFromFillingValue>
<FillValue xsi:type="xs:decimal">0</FillValue>
<FillChecking>DontCheck</FillChecking>
<ChoiceParameterLinks/>
<ChoiceParameters/>
<QuickChoice>Auto</QuickChoice>
<CreateOnInput>Auto</CreateOnInput>
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
<ChoiceForm/>
<NameInDataSource>id</NameInDataSource>
<ReadOnly>false</ReadOnly>
<AllowNull>false</AllowNull>
</Properties>
</Field>
<Field uuid="UUID-019">
<Properties>
<Name>name</Name>
<Synonym>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>name</v8:content>
</v8:item>
</Synonym>
<Comment/>
<Type>
<v8:Type>xs:string</v8:Type>
<v8:StringQualifiers>
<v8:Length>150</v8:Length>
<v8:AllowedLength>Variable</v8:AllowedLength>
</v8:StringQualifiers>
</Type>
<PasswordMode>false</PasswordMode>
<Format/>
<EditFormat/>
<ToolTip/>
<MarkNegatives>false</MarkNegatives>
<Mask/>
<MultiLine>false</MultiLine>
<ExtendedEdit>false</ExtendedEdit>
<MinValue xsi:nil="true"/>
<MaxValue xsi:nil="true"/>
<FillFromFillingValue>false</FillFromFillingValue>
<FillValue xsi:type="xs:string"/>
<FillChecking>DontCheck</FillChecking>
<ChoiceParameterLinks/>
<ChoiceParameters/>
<QuickChoice>Auto</QuickChoice>
<CreateOnInput>Auto</CreateOnInput>
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
<ChoiceForm/>
<NameInDataSource>name</NameInDataSource>
<ReadOnly>false</ReadOnly>
<AllowNull>false</AllowNull>
</Properties>
</Field>
<Field uuid="UUID-020">
<Properties>
<Name>article</Name>
<Synonym>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>article</v8:content>
</v8:item>
</Synonym>
<Comment/>
<Type>
<v8:Type>xs:string</v8:Type>
<v8:StringQualifiers>
<v8:Length>50</v8:Length>
<v8:AllowedLength>Variable</v8:AllowedLength>
</v8:StringQualifiers>
</Type>
<PasswordMode>false</PasswordMode>
<Format/>
<EditFormat/>
<ToolTip/>
<MarkNegatives>false</MarkNegatives>
<Mask/>
<MultiLine>false</MultiLine>
<ExtendedEdit>false</ExtendedEdit>
<MinValue xsi:nil="true"/>
<MaxValue xsi:nil="true"/>
<FillFromFillingValue>false</FillFromFillingValue>
<FillValue xsi:type="xs:string"/>
<FillChecking>DontCheck</FillChecking>
<ChoiceParameterLinks/>
<ChoiceParameters/>
<QuickChoice>Auto</QuickChoice>
<CreateOnInput>Auto</CreateOnInput>
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
<ChoiceForm/>
<NameInDataSource>article</NameInDataSource>
<ReadOnly>false</ReadOnly>
<AllowNull>true</AllowNull>
</Properties>
</Field>
</ChildObjects>
</Table>
</MetaDataObject>