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

Function TestWithToSqlErr

squirrel_test.go:75–87  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

73}
74
75func TestWithToSqlErr(t *testing.T) {
76 db := &DBStub{}
77 sqlizer := Select()
78
79 _, err := ExecWith(db, sqlizer)
80 assert.Error(t, err)
81
82 _, err = QueryWith(db, sqlizer)
83 assert.Error(t, err)
84
85 err = QueryRowWith(db, sqlizer).Scan()
86 assert.Error(t, err)
87}
88
89var testDebugUpdateSQL = Update("table").SetMap(Eq{"x": 1, "y": "val"})
90var expectedDebugUpateSQL = "UPDATE table SET x = '1', y = 'val'"

Callers

nothing calls this directly

Calls 5

SelectFunction · 0.85
ExecWithFunction · 0.85
QueryWithFunction · 0.85
QueryRowWithFunction · 0.85
ScanMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…