MCPcopy
hub / github.com/zeromicro/go-zero / TestParseSelect

Function TestParseSelect

tools/goctl/model/sql/parser/parser_test.go:24–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22}
23
24func TestParseSelect(t *testing.T) {
25 sqlFile := filepath.Join(pathx.MustTempDir(), "tmp.sql")
26 err := os.WriteFile(sqlFile, []byte("select * from user"), 0o777)
27 assert.Nil(t, err)
28
29 tables, err := Parse(sqlFile, "go_zero", false)
30 assert.Nil(t, err)
31 assert.Equal(t, 0, len(tables))
32}
33
34//go:embed testdata/user.sql
35var user string

Callers

nothing calls this directly

Calls 4

MustTempDirFunction · 0.92
JoinMethod · 0.80
ParseFunction · 0.70
EqualMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…