Minor adjustment
This commit is contained in:
parent
06a30f7820
commit
af3477dffd
2 changed files with 33 additions and 34 deletions
|
|
@ -1493,11 +1493,11 @@ dst.id <-> src.dst_id
|
|||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
srcIndex := g.Edges[0].SrcTableColumnIndex
|
||||
if srcIndex == nil || *srcIndex != 0 {
|
||||
t.Fatalf("Expected SrcTableColumnIndex to be 0, got %v", srcIndex)
|
||||
t.Fatalf("expected SrcTableColumnIndex to be 0, got %v", srcIndex)
|
||||
}
|
||||
dstIndex := g.Edges[0].DstTableColumnIndex
|
||||
if dstIndex == nil || *dstIndex != 1 {
|
||||
t.Fatalf("Expected DstTableColumnIndex to be 1, got %v", dstIndex)
|
||||
t.Fatalf("expected DstTableColumnIndex to be 1, got %v", dstIndex)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -833,42 +833,41 @@ a -> md -> b
|
|||
`,
|
||||
}, {
|
||||
name: "sql_tables",
|
||||
script: `
|
||||
users: {
|
||||
shape: sql_table
|
||||
id: int
|
||||
name: string
|
||||
email: string
|
||||
password: string
|
||||
last_login: datetime
|
||||
}
|
||||
script: `users: {
|
||||
shape: sql_table
|
||||
id: int
|
||||
name: string
|
||||
email: string
|
||||
password: string
|
||||
last_login: datetime
|
||||
}
|
||||
|
||||
products: {
|
||||
shape: sql_table
|
||||
id: int
|
||||
price: decimal
|
||||
sku: string
|
||||
name: string
|
||||
}
|
||||
products: {
|
||||
shape: sql_table
|
||||
id: int
|
||||
price: decimal
|
||||
sku: string
|
||||
name: string
|
||||
}
|
||||
|
||||
orders: {
|
||||
shape: sql_table
|
||||
id: int
|
||||
user_id: int
|
||||
product_id: int
|
||||
}
|
||||
orders: {
|
||||
shape: sql_table
|
||||
id: int
|
||||
user_id: int
|
||||
product_id: int
|
||||
}
|
||||
|
||||
shipments: {
|
||||
shape: sql_table
|
||||
id: int
|
||||
order_id: int
|
||||
tracking_number: string
|
||||
status: string
|
||||
}
|
||||
shipments: {
|
||||
shape: sql_table
|
||||
id: int
|
||||
order_id: int
|
||||
tracking_number: string
|
||||
status: string
|
||||
}
|
||||
|
||||
users.id <-> orders.user_id
|
||||
products.id <-> orders.product_id
|
||||
shipments.order_id <-> orders.id`,
|
||||
users.id <-> orders.user_id
|
||||
products.id <-> orders.product_id
|
||||
shipments.order_id <-> orders.id`,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue