(t *testing.T)
| 126 | } |
| 127 | |
| 128 | func TestInnerJoinWithExprOnHidden(t *testing.T) { |
| 129 | customers, orders := sampleForJoin() |
| 130 | customers.AddColumn("id2", datatable.Int, datatable.Expr("`id`+100")) |
| 131 | orders.AddColumn("user_id2", datatable.Int, datatable.Expr("`user_id`+100")) |
| 132 | customers.HideColumn("id") |
| 133 | dt, err := customers.InnerJoin(orders, datatable.On("[Customers].[id2]", "[Orders].[user_id2]")) |
| 134 | assert.NoError(t, err) |
| 135 | assert.NotNil(t, dt) |
| 136 | |
| 137 | fmt.Println(dt) |
| 138 | |
| 139 | checkTable(t, dt, |
| 140 | "prenom", "nom", "email", "ville", "id2", "user_id", "date_achat", "num_facture", "prix_total", |
| 141 | "Aimée", "Marechal", "aime.marechal@example.com", "Paris", 101, 1, time.Date(2013, time.January, 23, 0, 0, 0, 0, time.UTC), "A00103", 203.14, |
| 142 | "Aimée", "Marechal", "aime.marechal@example.com", "Paris", 101, 1, time.Date(2013, time.February, 14, 0, 0, 0, 0, time.UTC), "A00104", 124.00, |
| 143 | "Esmée", "Lefort", "esmee.lefort@example.com", "Lyon", 102, 2, time.Date(2013, time.February, 17, 0, 0, 0, 0, time.UTC), "A00105", 149.45, |
| 144 | "Marine", "Prevost", "m.prevost@example.com", "Lille", 103, 3, time.Date(2013, time.February, 21, 0, 0, 0, 0, time.UTC), "A00106", 235.35, |
| 145 | ) |
| 146 | } |
| 147 | |
| 148 | func TestLeftJoinWithExpr(t *testing.T) { |
| 149 | customers, orders := sampleForJoin() |
nothing calls this directly
no test coverage detected