(oo ...watch.WatchOption)
| 238 | } |
| 239 | |
| 240 | func (s *SQL) Watch(oo ...watch.WatchOption) (watch.Receiver, error) { |
| 241 | opts := &watch.WatchOptions{} |
| 242 | for _, o := range oo { |
| 243 | o(opts) |
| 244 | } |
| 245 | r := &receiver{ |
| 246 | exit: make(chan bool), |
| 247 | path: opts.Path, |
| 248 | value: s.Val(opts.Path...).Bytes(), |
| 249 | updates: make(chan []byte), |
| 250 | } |
| 251 | |
| 252 | s.watchers = append(s.watchers, r) |
| 253 | |
| 254 | return r, nil |
| 255 | } |
| 256 | |
| 257 | func (s *SQL) As(out any) bool { return false } |
| 258 |