(id string, pipe *Pipe)
| 116 | } |
| 117 | |
| 118 | func 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 | |
| 141 | func AddPipe(pipe *Pipe) (bool, error) { |
| 142 | affected, err := adapter.engine.Insert(pipe) |
no test coverage detected