d2/testdata/d2compiler/TestCompile/sql-constraints.exp.json
2023-06-07 15:38:52 -07:00

372 lines
14 KiB
JSON
Generated

{
"graph": {
"name": "",
"isFolderOnly": false,
"ast": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,0:0:0-4:1:110",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,0:0:0-4:1:110",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,0:0:0-0:1:1",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,0:3:3-4:1:110",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,1:2:7-1:18:23",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,1:2:7-1:7:12",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,1:2:7-1:7:12",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,1:9:14-1:18:23",
"value": [
{
"string": "sql_table",
"raw_string": "sql_table"
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,2:2:26-2:34:58",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,2:2:26-2:3:27",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,2:2:26-2:3:27",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"primary": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,2:5:29-2:8:32",
"value": [
{
"string": "int",
"raw_string": "int"
}
]
}
},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,2:9:33-2:34:58",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,2:10:34-2:33:57",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,2:10:34-2:20:44",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,2:10:34-2:20:44",
"value": [
{
"string": "constraint",
"raw_string": "constraint"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,2:22:46-2:33:57",
"value": [
{
"string": "primary_key",
"raw_string": "primary_key"
}
]
}
}
}
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,3:2:61-3:49:108",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,3:2:61-3:3:62",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,3:2:61-3:3:62",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"primary": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,3:5:64-3:8:67",
"value": [
{
"string": "int",
"raw_string": "int"
}
]
}
},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,3:9:68-3:49:108",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,3:10:69-3:48:107",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,3:10:69-3:20:79",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,3:10:69-3:20:79",
"value": [
{
"string": "constraint",
"raw_string": "constraint"
}
]
}
}
]
},
"primary": {},
"value": {
"array": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,3:22:81-3:47:106",
"nodes": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,3:23:82-3:34:93",
"value": [
{
"string": "primary_key",
"raw_string": "primary_key"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,3:36:95-3:47:106",
"value": [
{
"string": "foreign_key",
"raw_string": "foreign_key"
}
]
}
}
]
}
}
}
}
]
}
}
}
}
]
}
}
}
}
]
},
"root": {
"id": "",
"id_val": "",
"attributes": {
"label": {
"value": ""
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {},
"near_key": null,
"shape": {
"value": ""
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
},
"edges": null,
"objects": [
{
"id": "x",
"id_val": "x",
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,0:0:0-0:1:1",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/sql-constraints.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": -1
}
],
"sql_table": {
"columns": [
{
"name": {
"label": "a",
"fontSize": 0,
"fontFamily": "",
"language": "",
"color": "",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0
},
"type": {
"label": "int",
"fontSize": 0,
"fontFamily": "",
"language": "",
"color": "",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0
},
"constraint": [
"primary_key"
],
"reference": ""
},
{
"name": {
"label": "b",
"fontSize": 0,
"fontFamily": "",
"language": "",
"color": "",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0
},
"type": {
"label": "int",
"fontSize": 0,
"fontFamily": "",
"language": "",
"color": "",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0
},
"constraint": [
"primary_key",
"foreign_key"
],
"reference": ""
}
]
},
"attributes": {
"label": {
"value": "x"
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {},
"near_key": null,
"shape": {
"value": "sql_table"
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
}
]
},
"err": null
}