457 lines
15 KiB
JSON
457 lines
15 KiB
JSON
|
|
{
|
||
|
|
"graph": {
|
||
|
|
"ast": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,0:0:0-12:0:124",
|
||
|
|
"nodes": [
|
||
|
|
{
|
||
|
|
"map_key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,0:0:0-11:1:123",
|
||
|
|
"key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,0:0:0-0:1:1",
|
||
|
|
"path": [
|
||
|
|
{
|
||
|
|
"unquoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,0:0:0-0:1:1",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "a",
|
||
|
|
"raw_string": "a"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"primary": {},
|
||
|
|
"value": {
|
||
|
|
"map": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,0:3:3-11:0:122",
|
||
|
|
"nodes": [
|
||
|
|
{
|
||
|
|
"map_key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,1:2:7-3:3:42",
|
||
|
|
"key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,1:2:7-1:7:12",
|
||
|
|
"path": [
|
||
|
|
{
|
||
|
|
"unquoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,1:2:7-1:7:12",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "style",
|
||
|
|
"raw_string": "style"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"primary": {},
|
||
|
|
"value": {
|
||
|
|
"map": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,1:9:14-3:2:41",
|
||
|
|
"nodes": [
|
||
|
|
{
|
||
|
|
"map_key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,2:4:20-2:22:38",
|
||
|
|
"key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,2:4:20-2:8:24",
|
||
|
|
"path": [
|
||
|
|
{
|
||
|
|
"unquoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,2:4:20-2:8:24",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "fill",
|
||
|
|
"raw_string": "fill"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"primary": {},
|
||
|
|
"value": {
|
||
|
|
"unquoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,2:10:26-2:22:38",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "lemonchiffon",
|
||
|
|
"raw_string": "lemonchiffon"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"map_key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,5:2:46-8:3:112",
|
||
|
|
"key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,5:2:46-5:8:52",
|
||
|
|
"path": [
|
||
|
|
{
|
||
|
|
"unquoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,5:2:46-5:8:52",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "legend",
|
||
|
|
"raw_string": "legend"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"primary": {},
|
||
|
|
"value": {
|
||
|
|
"map": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,5:10:54-8:2:111",
|
||
|
|
"nodes": [
|
||
|
|
{
|
||
|
|
"map_key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,6:4:60-6:20:76",
|
||
|
|
"key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,6:4:60-6:9:65",
|
||
|
|
"path": [
|
||
|
|
{
|
||
|
|
"unquoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,6:4:60-6:9:65",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "shape",
|
||
|
|
"raw_string": "shape"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"primary": {},
|
||
|
|
"value": {
|
||
|
|
"unquoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,6:11:67-6:20:76",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "sql_table",
|
||
|
|
"raw_string": "sql_table"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"map_key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,7:4:81-7:31:108",
|
||
|
|
"key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,7:4:81-7:9:86",
|
||
|
|
"path": [
|
||
|
|
{
|
||
|
|
"double_quoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,7:4:81-7:9:86",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "***",
|
||
|
|
"raw_string": "***"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"primary": {},
|
||
|
|
"value": {
|
||
|
|
"unquoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,7:11:88-7:31:108",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "not in terraform yet",
|
||
|
|
"raw_string": "not in terraform yet"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"map_key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,10:2:116-10:7:121",
|
||
|
|
"key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,10:2:116-10:7:121",
|
||
|
|
"path": [
|
||
|
|
{
|
||
|
|
"unquoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,10:2:116-10:7:121",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "thing",
|
||
|
|
"raw_string": "thing"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"primary": {},
|
||
|
|
"value": {}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"root": {
|
||
|
|
"id": "",
|
||
|
|
"id_val": "",
|
||
|
|
"label_dimensions": {
|
||
|
|
"width": 0,
|
||
|
|
"height": 0
|
||
|
|
},
|
||
|
|
"attributes": {
|
||
|
|
"label": {
|
||
|
|
"value": ""
|
||
|
|
},
|
||
|
|
"style": {},
|
||
|
|
"near_key": null,
|
||
|
|
"shape": {
|
||
|
|
"value": ""
|
||
|
|
},
|
||
|
|
"direction": {
|
||
|
|
"value": ""
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"zIndex": 0
|
||
|
|
},
|
||
|
|
"edges": [],
|
||
|
|
"objects": [
|
||
|
|
{
|
||
|
|
"id": "a",
|
||
|
|
"id_val": "a",
|
||
|
|
"label_dimensions": {
|
||
|
|
"width": 0,
|
||
|
|
"height": 0
|
||
|
|
},
|
||
|
|
"references": [
|
||
|
|
{
|
||
|
|
"key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,0:0:0-0:1:1",
|
||
|
|
"path": [
|
||
|
|
{
|
||
|
|
"unquoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,0:0:0-0:1:1",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "a",
|
||
|
|
"raw_string": "a"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"key_path_index": 0,
|
||
|
|
"map_key_edge_index": 0
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"attributes": {
|
||
|
|
"label": {
|
||
|
|
"value": "a"
|
||
|
|
},
|
||
|
|
"style": {
|
||
|
|
"fill": {
|
||
|
|
"value": "lemonchiffon"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"near_key": null,
|
||
|
|
"shape": {
|
||
|
|
"value": ""
|
||
|
|
},
|
||
|
|
"direction": {
|
||
|
|
"value": ""
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"zIndex": 0
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": "legend",
|
||
|
|
"id_val": "legend",
|
||
|
|
"label_dimensions": {
|
||
|
|
"width": 0,
|
||
|
|
"height": 0
|
||
|
|
},
|
||
|
|
"references": [
|
||
|
|
{
|
||
|
|
"key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,5:2:46-5:8:52",
|
||
|
|
"path": [
|
||
|
|
{
|
||
|
|
"unquoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,5:2:46-5:8:52",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "legend",
|
||
|
|
"raw_string": "legend"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"key_path_index": 0,
|
||
|
|
"map_key_edge_index": 0
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"sql_table": {
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"name": {
|
||
|
|
"label": "***",
|
||
|
|
"fontSize": 0,
|
||
|
|
"fontFamily": "",
|
||
|
|
"language": "",
|
||
|
|
"color": "",
|
||
|
|
"italic": false,
|
||
|
|
"bold": false,
|
||
|
|
"underline": false,
|
||
|
|
"labelWidth": 0,
|
||
|
|
"labelHeight": 0
|
||
|
|
},
|
||
|
|
"type": {
|
||
|
|
"label": "not in terraform yet",
|
||
|
|
"fontSize": 0,
|
||
|
|
"fontFamily": "",
|
||
|
|
"language": "",
|
||
|
|
"color": "",
|
||
|
|
"italic": false,
|
||
|
|
"bold": false,
|
||
|
|
"underline": false,
|
||
|
|
"labelWidth": 0,
|
||
|
|
"labelHeight": 0
|
||
|
|
},
|
||
|
|
"constraint": "",
|
||
|
|
"reference": ""
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"attributes": {
|
||
|
|
"label": {
|
||
|
|
"value": "legend"
|
||
|
|
},
|
||
|
|
"style": {},
|
||
|
|
"near_key": null,
|
||
|
|
"shape": {
|
||
|
|
"value": "sql_table"
|
||
|
|
},
|
||
|
|
"direction": {
|
||
|
|
"value": ""
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"zIndex": 0
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": "\"***\"",
|
||
|
|
"id_val": "***",
|
||
|
|
"label_dimensions": {
|
||
|
|
"width": 0,
|
||
|
|
"height": 0
|
||
|
|
},
|
||
|
|
"references": [
|
||
|
|
{
|
||
|
|
"key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,7:4:81-7:9:86",
|
||
|
|
"path": [
|
||
|
|
{
|
||
|
|
"double_quoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,7:4:81-7:9:86",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "***",
|
||
|
|
"raw_string": "***"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"key_path_index": 0,
|
||
|
|
"map_key_edge_index": 0
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"attributes": {
|
||
|
|
"label": {
|
||
|
|
"value": "not in terraform yet"
|
||
|
|
},
|
||
|
|
"style": {},
|
||
|
|
"near_key": null,
|
||
|
|
"shape": {
|
||
|
|
"value": ""
|
||
|
|
},
|
||
|
|
"direction": {
|
||
|
|
"value": ""
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"zIndex": 0
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": "thing",
|
||
|
|
"id_val": "thing",
|
||
|
|
"label_dimensions": {
|
||
|
|
"width": 0,
|
||
|
|
"height": 0
|
||
|
|
},
|
||
|
|
"references": [
|
||
|
|
{
|
||
|
|
"key": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,10:2:116-10:7:121",
|
||
|
|
"path": [
|
||
|
|
{
|
||
|
|
"unquoted_string": {
|
||
|
|
"range": "d2/testdata/d2compiler/TestCompile/sql-regression.d2,10:2:116-10:7:121",
|
||
|
|
"value": [
|
||
|
|
{
|
||
|
|
"string": "thing",
|
||
|
|
"raw_string": "thing"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"key_path_index": 0,
|
||
|
|
"map_key_edge_index": 0
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"attributes": {
|
||
|
|
"label": {
|
||
|
|
"value": "thing"
|
||
|
|
},
|
||
|
|
"style": {},
|
||
|
|
"near_key": null,
|
||
|
|
"shape": {
|
||
|
|
"value": ""
|
||
|
|
},
|
||
|
|
"direction": {
|
||
|
|
"value": ""
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"zIndex": 0
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"err": null
|
||
|
|
}
|