MCPcopy
hub / github.com/the-open-agent/openagent / UpdatePipe

Function UpdatePipe

object/pipe.go:118–139  ·  view source on GitHub ↗
(id string, pipe *Pipe)

Source from the content-addressed store, hash-verified

116}
117
118func UpdatePipe(id string, pipe *Pipe) (bool, error) {
119 owner, name, err := util.GetOwnerAndNameFromIdWithError(id)
120 if err != nil {
121 return false, err
122 }
123 pipeDb, err := getPipe(owner, name)
124 if err != nil {
125 return false, err
126 }
127 if pipe == nil {
128 return false, nil
129 }
130
131 pipe.processPipeParams(pipeDb)
132
133 _, err = adapter.engine.ID(core.PK{owner, name}).AllCols().Update(pipe)
134 if err != nil {
135 return false, err
136 }
137
138 return true, nil
139}
140
141func AddPipe(pipe *Pipe) (bool, error) {
142 affected, err := adapter.engine.Insert(pipe)

Callers 1

UpdatePipeMethod · 0.92

Calls 3

processPipeParamsMethod · 0.80
getPipeFunction · 0.70

Tested by

no test coverage detected