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

Method TestInnerJoin

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

Source from the content-addressed store, hash-verified

95}
96
97func (s *TableSuite) TestInnerJoin(c *gc.C) {
98 join := table1.InnerJoinOn(table2, Eq(table1Col3, table2Col3))
99
100 buf := &bytes.Buffer{}
101
102 err := join.SerializeSql("db", buf)
103 c.Assert(err, gc.IsNil)
104
105 sql := buf.String()
106 c.Assert(
107 sql,
108 gc.Equals,
109 "`db`.`table1` JOIN `db`.`table2` ON `table1`.`col3`=`table2`.`col3`")
110}
111
112func (s *TableSuite) TestLeftJoin(c *gc.C) {
113 join := table1.LeftJoinOn(table2, Eq(table1Col3, table2Col3))

Callers

nothing calls this directly

Calls 4

EqFunction · 0.85
InnerJoinOnMethod · 0.65
SerializeSqlMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected