MCPcopy Create free account
hub / github.com/datasweet/datatable / TestRightJoin

Function TestRightJoin

join_test.go:93–108  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

91}
92
93func TestRightJoin(t *testing.T) {
94 customers, orders := sampleForJoin()
95
96 dt, err := customers.RightJoin(orders, datatable.On("[Customers].[id]", "[Orders].[user_id]"))
97 assert.NoError(t, err)
98 assert.NotNil(t, dt)
99
100 checkTable(t, dt,
101 "id", "prenom", "nom", "email", "ville", "date_achat", "num_facture", "prix_total",
102 1, "Aimée", "Marechal", "aime.marechal@example.com", "Paris", time.Date(2013, time.January, 23, 0, 0, 0, 0, time.UTC), "A00103", 203.14,
103 1, "Aimée", "Marechal", "aime.marechal@example.com", "Paris", time.Date(2013, time.February, 14, 0, 0, 0, 0, time.UTC), "A00104", 124.00,
104 2, "Esmée", "Lefort", "esmee.lefort@example.com", "Lyon", time.Date(2013, time.February, 17, 0, 0, 0, 0, time.UTC), "A00105", 149.45,
105 3, "Marine", "Prevost", "m.prevost@example.com", "Lille", time.Date(2013, time.February, 21, 0, 0, 0, 0, time.UTC), "A00106", 235.35,
106 nil, nil, nil, nil, nil, time.Date(2013, time.March, 2, 0, 0, 0, 0, time.UTC), "A00107", 47.58,
107 )
108}
109
110func TestOuterJoin(t *testing.T) {
111 customers, orders := sampleForJoin()

Callers

nothing calls this directly

Calls 4

OnFunction · 0.92
sampleForJoinFunction · 0.85
checkTableFunction · 0.85
RightJoinMethod · 0.80

Tested by

no test coverage detected