Minor adjustment

This commit is contained in:
Júlio César Batista 2022-11-16 16:15:14 -03:00
parent 06a30f7820
commit af3477dffd
No known key found for this signature in database
GPG key ID: 10C4B861BF314878
2 changed files with 33 additions and 34 deletions

View file

@ -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)
}
},
},

View file

@ -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`,
},
}