MCPcopy
hub / github.com/Masterminds/squirrel / TestEqInEmptyToSql

Function TestEqInEmptyToSql

expr_test.go:86–96  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

84}
85
86func TestEqInEmptyToSql(t *testing.T) {
87 b := Eq{"id": []int{}}
88 sql, args, err := b.ToSql()
89 assert.NoError(t, err)
90
91 expectedSql := "(1=0)"
92 assert.Equal(t, expectedSql, sql)
93
94 expectedArgs := []interface{}{}
95 assert.Equal(t, expectedArgs, args)
96}
97
98func TestNotEqInEmptyToSql(t *testing.T) {
99 b := NotEq{"id": []int{}}

Callers

nothing calls this directly

Calls 1

ToSqlMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…