MCPcopy
hub / github.com/dropbox/godropbox / TestNegateExpr

Method TestNegateExpr

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

Source from the content-addressed store, hash-verified

181}
182
183func (s *ExprSuite) TestNegateExpr(c *gc.C) {
184 expr := Not(EqL(table1Col1, 123))
185
186 buf := &bytes.Buffer{}
187
188 err := expr.SerializeSql(buf)
189 c.Assert(err, gc.IsNil)
190
191 sql := buf.String()
192 c.Assert(sql, gc.Equals, "NOT (`table1`.`col1`=123)")
193}
194
195func (s *ExprSuite) TestBinaryExprNilRHS(c *gc.C) {
196 expr := Lt(table1Col1, nil)

Callers

nothing calls this directly

Calls 4

NotFunction · 0.85
EqLFunction · 0.85
SerializeSqlMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected