{
"name": "Внешний источник данных: таблицы, поля, функция",
"input": {
"type": "ExternalDataSource",
"name": "PG",
"dataLockControlMode": "AutomaticAndManaged",
"tables": {
"prices": ["product_id: Number(10,0)", "period: Date", "price: Number(15,2)"],
"products": {
"nameInDataSource": "eds.public.products",
"tableDataType": "ObjectData",
"keyFields": ["id"],
"presentationField": "name",
"parentField": "parent_id",
"dataVersionField": "row_ver",
"transactionsIsolationLevel": "ReadUncommitted",
"dataLockFields": ["id"],
"fields": [
"id: Number(10,0)",
"name: String(150)",
"article: String(50) | nullable",
"parent_id: ExternalDataSourceTableRef.PG.products | nullable",
"row_ver: Number(19,0) | readonly"
]
},
"byParent": {
"tableType": "Expression",
"expressionInDataSource": "public.f_products_by_parent(&1)",
"fields": ["id: Number(10,0)", "name: String(150)"]
}
},
"functions": {
"total": { "expression": "public.f_total(&1, &2)", "returns": "Number(15,2)" },
"nextKey": "NEXT VALUE FOR public.seq_key"
}
},
"validatePath": "ExternalDataSources/PG",
"expect": {
"files": [
"ExternalDataSources/PG.xml",
"ExternalDataSources/PG/Tables/products.xml",
"ExternalDataSources/PG/Tables/prices.xml",
"ExternalDataSources/PG/Tables/byParent.xml"
],
"fileContains": [
{
"file": "ExternalDataSources/PG/Tables/products.xml",
"text": [
"cfg:ExternalDataSourceTableRef.PG.products",
"ExternalDataSource.PG.Table.products.Field.id",
"ExternalDataSource.PG.Table.products.Field.name",
"",
"ReadUncommitted",
"eds.public.products"
]
},
{
"file": "ExternalDataSources/PG/Tables/byParent.xml",
"text": ["Expression", "", "public.f_products_by_parent(&1)"]
},
{
"file": "ExternalDataSources/PG.xml",
"text": [
"AutomaticAndManaged",
"",
"public.f_total(&1, &2)"
]
}
]
}
}