MCPcopy
hub / github.com/dropbox/godropbox / TestJoinColumns

Method TestJoinColumns

database/sqlbuilder/table_test.go:144–155  ·  view source on GitHub ↗
(c *gc.C)

Source from the content-addressed store, hash-verified

142}
143
144func (s *TableSuite) TestJoinColumns(c *gc.C) {
145 join := table1.RightJoinOn(table2, Eq(table1Col3, table2Col3))
146
147 cols := join.Columns()
148 c.Assert(len(cols), gc.Equals, 6)
149 c.Assert(cols[0], gc.Equals, table1Col1)
150 c.Assert(cols[1], gc.Equals, table1Col2)
151 c.Assert(cols[2], gc.Equals, table1Col3)
152 c.Assert(cols[3], gc.Equals, table1Col4)
153 c.Assert(cols[4], gc.Equals, table2Col3)
154 c.Assert(cols[5], gc.Equals, table2Col4)
155}
156
157func (s *TableSuite) TestNestedInnerJoin(c *gc.C) {
158 join1 := table1.InnerJoinOn(table2, Eq(table1Col3, table2Col3))

Callers

nothing calls this directly

Calls 3

EqFunction · 0.85
RightJoinOnMethod · 0.65
ColumnsMethod · 0.65

Tested by

no test coverage detected