MCPcopy Create free account
hub / github.com/temporalio/temporal / buildDSN

Function buildDSN

common/persistence/sql/sqlplugin/sqlite/plugin.go:165–179  ·  view source on GitHub ↗
(cfg *config.SQL)

Source from the content-addressed store, hash-verified

163}
164
165func buildDSN(cfg *config.SQL) (string, error) {
166 if cfg.ConnectAttributes == nil {
167 cfg.ConnectAttributes = make(map[string]string)
168 }
169 vals, err := buildDSNAttr(cfg)
170 if err != nil {
171 return "", err
172 }
173 dsn := fmt.Sprintf(
174 "file:%s?%v",
175 cfg.DatabaseName,
176 vals.Encode(),
177 )
178 return dsn, nil
179}
180
181func buildDSNAttr(cfg *config.SQL) (url.Values, error) {
182 parameters := url.Values{}

Callers 3

AllocateMethod · 0.70
CloseMethod · 0.70
createDBConnectionMethod · 0.70

Calls 2

buildDSNAttrFunction · 0.70
EncodeMethod · 0.65

Tested by

no test coverage detected