MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / execTemplate

Function execTemplate

plugins/destination/mssql/queries/template.go:12–20  ·  view source on GitHub ↗
(name string, data any)

Source from the content-addressed store, hash-verified

10var queriesFS embed.FS
11
12func execTemplate(name string, data any) string {
13 tpl := template.Must(template.New(name).Funcs(map[string]any{
14 "sanitizeID": sanitizeID,
15 "sql": SQLType,
16 }).ParseFS(queriesFS, "templates/*.sql.tpl"))
17 var buf bytes.Buffer
18 template.Must(tpl, tpl.Execute(&buf, data))
19 return buf.String()
20}

Callers 10

DeleteStaleFunction · 0.85
ReadFunction · 0.85
TVPDropProcFunction · 0.85
TVPDropTypeFunction · 0.85
TVPAddProcFunction · 0.85
TVPAddTypeFunction · 0.85
CreateTableFunction · 0.85
DropTableFunction · 0.85
AddColumnFunction · 0.85
UpdateColumnTypeFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected