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

Function TestQuery_Basic

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

Source from the content-addressed store, hash-verified

7)
8
9func TestQuery_Basic(t *testing.T) {
10 q := Q().Space("SELECT * FROM users")
11 sql, args, err := q.ToSQL()
12 require.NoError(t, err)
13 require.Equal(t, "SELECT * FROM users", sql)
14 require.Empty(t, args)
15}
16
17func TestQuery_WithParameters(t *testing.T) {
18 q := Q().Space("SELECT * FROM users").Where("id = ?", 123)

Callers

nothing calls this directly

Calls 4

QFunction · 0.85
SpaceMethod · 0.80
ToSQLMethod · 0.80
EqualMethod · 0.65

Tested by

no test coverage detected