mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-24 05:31:02 +03:00
fix(meta-compile): parse shorthand syntax for Task AddressingAttributes
AddressingAttribute was taking the entire shorthand string (e.g. "Name: String(100)") as the attribute name instead of parsing it through Parse-AttributeShorthand. This caused String type without length qualifiers (NTEXT in SQL), making Index creation impossible. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
589091510b
commit
5a1974be4e
@@ -2392,13 +2392,11 @@ function Emit-AddressingAttribute {
|
|||||||
$addressingDimension = ""
|
$addressingDimension = ""
|
||||||
$indexing = "Index"
|
$indexing = "Index"
|
||||||
|
|
||||||
if ($addrDef -is [string]) {
|
$parsed = Parse-AttributeShorthand $addrDef
|
||||||
$name = "$addrDef"
|
$name = $parsed.name
|
||||||
$attrSynonym = Split-CamelCase $name
|
$attrSynonym = $parsed.synonym
|
||||||
} else {
|
$typeStr = $parsed.type
|
||||||
$name = "$($addrDef.name)"
|
if ($addrDef -isnot [string]) {
|
||||||
$attrSynonym = if ($addrDef.synonym) { "$($addrDef.synonym)" } else { Split-CamelCase $name }
|
|
||||||
if ($addrDef.type) { $typeStr = "$($addrDef.type)" }
|
|
||||||
if ($addrDef.addressingDimension) { $addressingDimension = "$($addrDef.addressingDimension)" }
|
if ($addrDef.addressingDimension) { $addressingDimension = "$($addrDef.addressingDimension)" }
|
||||||
if ($addrDef.indexing) { $indexing = "$($addrDef.indexing)" }
|
if ($addrDef.indexing) { $indexing = "$($addrDef.indexing)" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2068,14 +2068,11 @@ def emit_addressing_attribute(indent, addr_def):
|
|||||||
type_str = ''
|
type_str = ''
|
||||||
addressing_dimension = ''
|
addressing_dimension = ''
|
||||||
indexing = 'Index'
|
indexing = 'Index'
|
||||||
if isinstance(addr_def, str):
|
parsed = parse_attribute_shorthand(addr_def)
|
||||||
name = addr_def
|
name = parsed['name']
|
||||||
attr_synonym = split_camel_case(name)
|
attr_synonym = parsed['synonym']
|
||||||
else:
|
type_str = parsed['type']
|
||||||
name = str(addr_def.get('name', ''))
|
if not isinstance(addr_def, str):
|
||||||
attr_synonym = str(addr_def['synonym']) if addr_def.get('synonym') else split_camel_case(name)
|
|
||||||
if addr_def.get('type'):
|
|
||||||
type_str = str(addr_def['type'])
|
|
||||||
if addr_def.get('addressingDimension'):
|
if addr_def.get('addressingDimension'):
|
||||||
addressing_dimension = str(addr_def['addressingDimension'])
|
addressing_dimension = str(addr_def['addressingDimension'])
|
||||||
if addr_def.get('indexing'):
|
if addr_def.get('indexing'):
|
||||||
|
|||||||
Reference in New Issue
Block a user