feat(skd-edit): add patch-query operation for substring replacement in queries

Addresses user feedback: set-query is all-or-nothing, and editing XML
directly is fragile due to escaping. patch-query allows targeted string
replacement via "old => new" shorthand, with batch mode support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-04-04 11:46:01 +03:00
co-authored by Claude Opus 4.6
parent 974e8ff5e4
commit eebc2a0679
6 changed files with 121 additions and 5 deletions
@@ -0,0 +1,21 @@
{
"name": "Точечная замена в тексте запроса",
"preRun": [
{
"script": "skd-compile/scripts/skd-compile",
"input": {
"dataSets": [{
"name": "Основной",
"query": "ВЫБРАТЬ 1 КАК Поле",
"fields": ["Поле"]
}]
},
"args": { "-DefinitionFile": "{inputFile}", "-OutputPath": "{workDir}/Template.xml" }
}
],
"params": {
"templatePath": "Template.xml",
"operation": "patch-query",
"value": "1 КАК Поле => Т.Наименование КАК Имя"
}
}