MCPcopy Create free account
hub / github.com/pydio/cells / Set

Method Set

common/config/sql/sql.go:200–220  ·  view source on GitHub ↗
(value interface{})

Source from the content-addressed store, hash-verified

198}
199
200func (s *SQL) Set(value interface{}) error {
201 dao := s.dao.(DAO)
202
203 b, err := json.Marshal(value)
204 if err != nil {
205 return err
206 }
207
208 if err := dao.Set(context.TODO(), b); err != nil {
209 return err
210 }
211
212 v := configx.New(kv.WithJSON())
213 v.Set(b)
214
215 s.config = v
216
217 s.update()
218
219 return nil
220}
221
222func (s *SQL) update() {
223 for _, w := range s.watchers {

Callers 1

DelMethod · 0.95

Calls 5

updateMethod · 0.95
NewFunction · 0.92
WithJSONFunction · 0.92
MarshalMethod · 0.65
SetMethod · 0.65

Tested by

no test coverage detected