@cyklang/core
Advanced tools
Comparing version 0.25.3 to 0.26.0
@@ -55,2 +55,3 @@ import { FunctionData, ObjectDataType, Scope, Tag, Variables } from "./Structure"; | ||
parentName: string; | ||
cascade: string; | ||
keyparts: Variables; | ||
@@ -57,0 +58,0 @@ parse(tag: Tag, scope: Scope): Promise<void>; |
@@ -80,2 +80,3 @@ "use strict"; | ||
this.parentName = ''; | ||
this.cascade = ''; | ||
this.keyparts = new Structure_1.Variables(); | ||
@@ -85,2 +86,3 @@ } | ||
this.parentName = tag.attributes.PARENT; | ||
this.cascade = tag.attributes.CASCADE; | ||
if (this.parentName === undefined) { | ||
@@ -348,2 +350,5 @@ throw new Structure_1.XmlError('<foreignkey> without parent attribute', tag); | ||
attr.parent = foreignkey.parentName; | ||
if (foreignkey.cascade) { | ||
attr.cascade = foreignkey.cascade; | ||
} | ||
objFK.foreignkey.push({ _attr: attr }); | ||
@@ -350,0 +355,0 @@ objArray.push(objFK); |
{ | ||
"name": "@cyklang/core", | ||
"version": "0.25.3", | ||
"version": "0.26.0", | ||
"description": "XML script language", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/pchaneyo/cyk-core", |
@@ -111,5 +111,7 @@ import { FunctionData, ObjectData, ObjectDataType, Scope, Tag, Variables, XmlError } from "./Structure" | ||
parentName: string = '' | ||
cascade: string = '' | ||
keyparts: Variables = new Variables() | ||
async parse(tag: Tag, scope: Scope) { | ||
this.parentName = tag.attributes.PARENT | ||
this.cascade = tag.attributes.CASCADE | ||
if (this.parentName === undefined) { | ||
@@ -391,2 +393,5 @@ throw new XmlError('<foreignkey> without parent attribute', tag) | ||
attr.parent = foreignkey.parentName | ||
if (foreignkey.cascade) { | ||
attr.cascade = foreignkey.cascade | ||
} | ||
objFK.foreignkey.push({ _attr: attr }) | ||
@@ -393,0 +398,0 @@ objArray.push(objFK) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
857433
19795