(t *testing.T)
| 166 | } |
| 167 | |
| 168 | func TestRightJoinWithExpr(t *testing.T) { |
| 169 | customers, orders := sampleForJoin() |
| 170 | customers.AddColumn("id2", datatable.Int, datatable.Expr("`id`+100")) |
| 171 | orders.AddColumn("user_id2", datatable.Int, datatable.Expr("`user_id`+100")) |
| 172 | dt, err := customers.RightJoin(orders, datatable.On("[Customers].[id2]", "[Orders].[user_id2]")) |
| 173 | assert.NoError(t, err) |
| 174 | assert.NotNil(t, dt) |
| 175 | |
| 176 | fmt.Println(dt) |
| 177 | |
| 178 | checkTable(t, dt, |
| 179 | "id", "prenom", "nom", "email", "ville", "id2", "user_id", "date_achat", "num_facture", "prix_total", |
| 180 | 1, "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, |
| 181 | 1, "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, |
| 182 | 2, "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, |
| 183 | 3, "Marine", "Prevost", "m.prevost@example.com", "Lille", 103, 3, time.Date(2013, time.February, 21, 0, 0, 0, 0, time.UTC), "A00106", 235.35, |
| 184 | nil, nil, nil, nil, nil, nil, 5, time.Date(2013, time.March, 2, 0, 0, 0, 0, time.UTC), "A00107", 47.58, |
| 185 | ) |
| 186 | } |
| 187 | |
| 188 | func TestJoinWithColumnName(t *testing.T) { |
| 189 | customers, orders := sampleForJoin() |
nothing calls this directly
no test coverage detected