MCPcopy Index your code
hub / github.com/dropbox/godropbox / TestRightJoin

Method TestRightJoin

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

Source from the content-addressed store, hash-verified

126}
127
128func (s *TableSuite) TestRightJoin(c *gc.C) {
129 join := table1.RightJoinOn(table2, Eq(table1Col3, table2Col3))
130
131 buf := &bytes.Buffer{}
132
133 err := join.SerializeSql("db", buf)
134 c.Assert(err, gc.IsNil)
135
136 sql := buf.String()
137 c.Assert(
138 sql,
139 gc.Equals,
140 "`db`.`table1` RIGHT JOIN `db`.`table2` "+
141 "ON `table1`.`col3`=`table2`.`col3`")
142}
143
144func (s *TableSuite) TestJoinColumns(c *gc.C) {
145 join := table1.RightJoinOn(table2, Eq(table1Col3, table2Col3))

Callers

nothing calls this directly

Calls 4

EqFunction · 0.85
RightJoinOnMethod · 0.65
SerializeSqlMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected