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

Function TestEqInToSql

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

Source from the content-addressed store, hash-verified

48}
49
50func TestEqInToSql(t *testing.T) {
51 b := Eq{"id": []int{1, 2, 3}}
52 sql, args, err := b.ToSql()
53 assert.NoError(t, err)
54
55 expectedSql := "id IN (?,?,?)"
56 assert.Equal(t, expectedSql, sql)
57
58 expectedArgs := []interface{}{1, 2, 3}
59 assert.Equal(t, expectedArgs, args)
60}
61
62func TestNotEqToSql(t *testing.T) {
63 b := NotEq{"id": 1}

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…