MCPcopy Index your code
hub / github.com/cloudquery/cloudquery / params

Method params

plugins/destination/clickhouse/client/spec/engine.go:29–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27}
28
29func (e *Engine) params() []string {
30 res := make([]string, len(e.Parameters))
31
32 for i, p := range e.Parameters {
33 switch t := p.(type) {
34 case string:
35 res[i] = "'" + t + "'"
36 case int:
37 res[i] = strconv.Itoa(t)
38 case int32:
39 res[i] = strconv.FormatInt(int64(t), 10)
40 case int64:
41 res[i] = strconv.FormatInt(t, 10)
42 case float32:
43 res[i] = strconv.FormatFloat(float64(t), 'f', -1, 32)
44 case float64:
45 res[i] = strconv.FormatFloat(t, 'f', -1, 64)
46 case json.Number:
47 res[i] = t.String()
48 case bool:
49 if t {
50 res[i] = "true"
51 } else {
52 res[i] = "false"
53 }
54 default:
55 res[i] = fmt.Sprint(p)
56 }
57 }
58
59 return res
60}
61
62func (e *Engine) Validate() error {
63 if !strings.HasSuffix(e.Name, MergeTree) {

Callers 1

StringMethod · 0.95

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected