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

Function TestQuery_Join

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

Source from the content-addressed store, hash-verified

45}
46
47func TestQuery_Join(t *testing.T) {
48 q := Q().Space("SELECT").
49 Join(", ", "id").
50 Join(", ", "name").
51 Join(", ", "email").
52 Space("FROM users")
53 sql, args, err := q.ToSQL()
54 require.NoError(t, err)
55 require.Equal(t, "SELECT, id, name, email FROM users", sql)
56 require.Empty(t, args)
57}
58
59func TestQuery_JoinWithParams(t *testing.T) {
60 q := Q().Space("INSERT INTO users (name, email) VALUES").

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected