Skip to content

Commit 6d19b6a

Browse files
Hck 10442 add max length conversion adapters (#42)
* HCK-10442: added Polyglot adapter to properly convert hasMaxLength * HCK-10442: removed redundant comment * HCK-10442: imrpoved adapter
1 parent 635b7b0 commit 6d19b6a

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

polyglot/adapter.json

+27
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,33 @@
108108
"to": {
109109
"mode": "point"
110110
}
111+
},
112+
{
113+
"from": {
114+
"type": "varchar",
115+
"hasMaxLength": true
116+
},
117+
"to": {
118+
"length": 21844
119+
}
120+
},
121+
{
122+
"from": {
123+
"type": "nvarchar",
124+
"hasMaxLength": true
125+
},
126+
"to": {
127+
"length": 21844
128+
}
129+
},
130+
{
131+
"from": {
132+
"type": "binary",
133+
"hasMaxLength": true
134+
},
135+
"to": {
136+
"length": 21844
137+
}
111138
}
112139
]
113140
}

polyglot/convertAdapter.json

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/**
2+
*
3+
* {
4+
* "add": {
5+
* "entity": [<names of new property>],
6+
* "container": [<names of new property>],
7+
* "model": [<names of new property>],
8+
* "view": [<names of new property>],
9+
* "field": {
10+
* "<type>": [<names of new property>]
11+
* }
12+
* },
13+
* "delete": {
14+
* "entity": [<names of new property>],
15+
* "container": [<names of new property>],
16+
* "model": [<names of new property>],
17+
* "view": [<names of new property>],
18+
* "field": {
19+
* "<type>": [<names of new property>]
20+
* }
21+
* },
22+
* "modify": {
23+
* "entity": [
24+
* {
25+
* "from": { <properties that identify record> },
26+
* "to": { <properties that need to be changed> }
27+
* }
28+
* ],
29+
* "container": [],
30+
* "model": [],
31+
* "view": [],
32+
* "field": []
33+
* },
34+
* }
35+
*/
36+
{
37+
"modify": {
38+
"field": [
39+
{
40+
"from": {
41+
"childType": "char",
42+
"length": 21844
43+
},
44+
"to": {
45+
"hasMaxLength": true
46+
}
47+
},
48+
{
49+
"from": {
50+
"mode": "varbinary",
51+
"length": 21844
52+
},
53+
"to": {
54+
"hasMaxLength": true
55+
}
56+
}
57+
]
58+
}
59+
}

0 commit comments

Comments
 (0)