MCPcopy Create free account
hub / github.com/deepflowio/deepflow / SimpleExecute

Function SimpleExecute

server/querier/engine/clickhouse/simple_query.go:25–45  ·  view source on GitHub ↗
(args *common.QuerierParams)

Source from the content-addressed store, hash-verified

23)
24
25func SimpleExecute(args *common.QuerierParams) (result *common.Result, debug map[string]interface{}, err error) {
26 chClient := client.Client{
27 Host: config.Cfg.Clickhouse.Host,
28 Port: config.Cfg.Clickhouse.Port,
29 UserName: config.Cfg.Clickhouse.User,
30 Password: config.Cfg.Clickhouse.Password,
31 DB: "default",
32 Context: args.Context,
33 }
34 query_uuid := args.QueryUUID
35 debugInfo := &client.DebugInfo{}
36 queryDebug := &client.Debug{
37 IP: config.Cfg.Clickhouse.Host,
38 QueryUUID: query_uuid,
39 }
40 chClient.Debug = queryDebug
41 result, err = chClient.DoQuery(&client.QueryParams{Sql: args.Sql, UseQueryCache: args.UseQueryCache, QueryCacheTTL: args.QueryCacheTTL})
42 debugInfo.Debug = append(debugInfo.Debug, *queryDebug)
43 debug = debugInfo.Get()
44 return
45}

Callers

nothing calls this directly

Calls 2

DoQueryMethod · 0.95
GetMethod · 0.95

Tested by

no test coverage detected