(t *testing.T)
| 59 | } |
| 60 | |
| 61 | func TestInnerJoin(t *testing.T) { |
| 62 | customers, orders := sampleForJoin() |
| 63 | customers.AddColumn("concat", datatable.String, datatable.Expr("concat(`prenom`, `nom`)")) |
| 64 | dt, err := customers.InnerJoin(orders, datatable.On("[Customers].[id]", "[Orders].[user_id]")) |
| 65 | assert.NoError(t, err) |
| 66 | assert.NotNil(t, dt) |
| 67 | checkTable(t, dt, |
| 68 | "id", "prenom", "nom", "email", "ville", "concat", "date_achat", "num_facture", "prix_total", |
| 69 | 1, "Aimée", "Marechal", "aime.marechal@example.com", "Paris", "AiméeMarechal", time.Date(2013, time.January, 23, 0, 0, 0, 0, time.UTC), "A00103", 203.14, |
| 70 | 1, "Aimée", "Marechal", "aime.marechal@example.com", "Paris", "AiméeMarechal", time.Date(2013, time.February, 14, 0, 0, 0, 0, time.UTC), "A00104", 124.00, |
| 71 | 2, "Esmée", "Lefort", "esmee.lefort@example.com", "Lyon", "EsméeLefort", time.Date(2013, time.February, 17, 0, 0, 0, 0, time.UTC), "A00105", 149.45, |
| 72 | 3, "Marine", "Prevost", "m.prevost@example.com", "Lille", "MarinePrevost", time.Date(2013, time.February, 21, 0, 0, 0, 0, time.UTC), "A00106", 235.35, |
| 73 | ) |
| 74 | } |
| 75 | |
| 76 | func TestLeftJoin(t *testing.T) { |
| 77 | customers, orders := sampleForJoin() |
nothing calls this directly
no test coverage detected