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

Method TestSelectOrderByDesc

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

Source from the content-addressed store, hash-verified

167}
168
169func (s *StmtSuite) TestSelectOrderByDesc(c *gc.C) {
170 q := table1.Select(table1Col1, table1Col2).OrderBy(Desc(table1Col2))
171 sql, err := q.String("db")
172
173 c.Assert(err, gc.IsNil)
174 c.Assert(
175 sql,
176 gc.Equals,
177 "SELECT `table1`.`col1`,`table1`.`col2` "+
178 "FROM `db`.`table1` ORDER BY `table1`.`col2` DESC")
179}
180
181func (s *StmtSuite) TestSelectMultiOrderBy(c *gc.C) {
182 q := table1.Select(table1Col1, table1Col2)

Callers

nothing calls this directly

Calls 4

DescFunction · 0.85
OrderByMethod · 0.65
SelectMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected