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

Method TestSelectMultiOrderBy

database/sqlbuilder/statement_test.go:181–193  ·  view source on GitHub ↗
(c *gc.C)

Source from the content-addressed store, hash-verified

179}
180
181func (s *StmtSuite) TestSelectMultiOrderBy(c *gc.C) {
182 q := table1.Select(table1Col1, table1Col2)
183 q.OrderBy(table1Col2, table1Col1)
184 sql, err := q.String("db")
185
186 c.Assert(err, gc.IsNil)
187 c.Assert(
188 sql,
189 gc.Equals,
190 "SELECT `table1`.`col1`,`table1`.`col2` "+
191 "FROM `db`.`table1` "+
192 "ORDER BY `table1`.`col2`,`table1`.`col1`")
193}
194
195func (s *StmtSuite) TestSelectOnJoin(c *gc.C) {
196

Callers

nothing calls this directly

Calls 3

SelectMethod · 0.65
OrderByMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected