MCPcopy Create free account
hub / github.com/crossjoin-io/crossjoin / ReadDataConnection

Method ReadDataConnection

api/data_connections.go:14–25  ·  view source on GitHub ↗
(hash, id string)

Source from the content-addressed store, hash-verified

12}
13
14func (api *API) ReadDataConnection(hash, id string) (*config.DataConnection, error) {
15 conn := &config.DataConnection{
16 ID: id,
17 }
18 err := api.db.QueryRow("SELECT type, path, connection_string FROM data_connections WHERE config_hash = $1 AND id = $2", hash, id).
19 Scan(&conn.Type, &conn.Path, &conn.ConnectionString)
20 if err != nil {
21 return nil, err
22 }
23 conn.ExpandConnectionString()
24 return conn, nil
25}

Callers 1

fetchSingleMethod · 0.95

Calls 1

Tested by

no test coverage detected