MCPcopy Create free account
hub / github.com/bytebase/bytebase / TestQuery_MismatchedParameters

Function TestQuery_MismatchedParameters

backend/common/qb/qb_test.go:122–127  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

120}
121
122func TestQuery_MismatchedParameters(t *testing.T) {
123 q := Q().Space("SELECT * FROM users WHERE id = ? AND name = ?", 123)
124 _, _, err := q.ToSQL()
125 require.Error(t, err)
126 require.Contains(t, err.Error(), "mismatched parameters")
127}
128
129func TestQuery_MultilineSQL(t *testing.T) {
130 q := Q().Space(`

Callers

nothing calls this directly

Calls 4

QFunction · 0.85
SpaceMethod · 0.80
ToSQLMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected