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

Function TestEqToSql

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

Source from the content-addressed store, hash-verified

27}
28
29func TestEqToSql(t *testing.T) {
30 b := Eq{"id": 1}
31 sql, args, err := b.ToSql()
32 assert.NoError(t, err)
33
34 expectedSql := "id = ?"
35 assert.Equal(t, expectedSql, sql)
36
37 expectedArgs := []interface{}{1}
38 assert.Equal(t, expectedArgs, args)
39}
40
41func TestEqEmptyToSql(t *testing.T) {
42 sql, args, err := Eq{}.ToSql()

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…