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

Function amendConnectionString

plugins/destination/duckdb/client/client.go:127–141  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

125}
126
127func amendConnectionString(s string) string {
128 if !strings.HasPrefix(s, "md:") {
129 return s
130 }
131
132 // Motherduck, add 'custom_user_agent' to the connection string
133 if strings.Contains(s, "?") {
134 s += "&"
135 } else {
136 s += "?"
137 }
138 s += fmt.Sprintf("custom_user_agent=%s_%s_%s/%s(%s_%s)",
139 internalPlugin.Team, internalPlugin.Kind, internalPlugin.Name, strings.TrimPrefix(internalPlugin.Version, "v"), runtime.GOOS, runtime.GOARCH)
140 return s
141}

Callers 2

NewFunction · 0.85
TestConnectionFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestConnectionFunction · 0.68