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

Function TestWherePartMap

where_test.go:45–56  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestWherePartMap(t *testing.T) {
46 test := func(pred interface{}) {
47 sql, _, _ := newWherePart(pred).ToSql()
48 expect := []string{"x = ? AND y = ?", "y = ? AND x = ?"}
49 if sql != expect[0] && sql != expect[1] {
50 t.Errorf("expected one of %#v, got %#v", expect, sql)
51 }
52 }
53 m := map[string]interface{}{"x": 1, "y": 2}
54 test(m)
55 test(Eq(m))
56}

Callers

nothing calls this directly

Calls 3

newWherePartFunction · 0.85
EqTypeAlias · 0.85
ToSqlMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…