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

Method StoreDataConnection

api/data_connections.go:7–12  ·  view source on GitHub ↗
(hash string, connection config.DataConnection)

Source from the content-addressed store, hash-verified

5)
6
7func (api *API) StoreDataConnection(hash string, connection config.DataConnection) error {
8 _, err := api.db.Exec("REPLACE INTO data_connections (config_hash, id, type, path, connection_string) VALUES ($1, $2, $3, $4, $5)",
9 hash, connection.ID, connection.Type, connection.Path, connection.ConnectionString,
10 )
11 return err
12}
13
14func (api *API) ReadDataConnection(hash, id string) (*config.DataConnection, error) {
15 conn := &config.DataConnection{

Callers 1

LoadConfigMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected