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

Function TestEqNotInToSql

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

Source from the content-addressed store, hash-verified

72}
73
74func TestEqNotInToSql(t *testing.T) {
75 b := NotEq{"id": []int{1, 2, 3}}
76 sql, args, err := b.ToSql()
77 assert.NoError(t, err)
78
79 expectedSql := "id NOT IN (?,?,?)"
80 assert.Equal(t, expectedSql, sql)
81
82 expectedArgs := []interface{}{1, 2, 3}
83 assert.Equal(t, expectedArgs, args)
84}
85
86func TestEqInEmptyToSql(t *testing.T) {
87 b := Eq{"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…