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

Method TestInExpr

database/sqlbuilder/expression_test.go:303–314  ·  view source on GitHub ↗
(c *gc.C)

Source from the content-addressed store, hash-verified

301}
302
303func (s *ExprSuite) TestInExpr(c *gc.C) {
304 values := []int32{1, 2, 3}
305 expr := In(table1Col1, values)
306
307 buf := &bytes.Buffer{}
308
309 err := expr.SerializeSql(buf)
310 c.Assert(err, gc.IsNil)
311
312 sql := buf.String()
313 c.Assert(sql, gc.Equals, "`table1`.`col1` IN (1,2,3)")
314}
315
316func (s *ExprSuite) TestInExprEmptyList(c *gc.C) {
317 values := []int32{}

Callers

nothing calls this directly

Calls 3

InFunction · 0.85
SerializeSqlMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected