Fix live queries

This commit is contained in:
Tobie Morgan Hitchcock 2019-03-05 11:40:08 +00:00
parent 4415978ac6
commit 09c32c2d64

View file

@ -243,17 +243,15 @@ func (s *socket) executeLive(e *executor, ctx context.Context, stm *sql.LiveStat
// Store the live query in the database layer. // Store the live query in the database layer.
var what sql.Exprs for key, val := range stm.What {
for _, val := range stm.What {
w, err := e.fetch(ctx, val, nil) w, err := e.fetch(ctx, val, nil)
if err != nil { if err != nil {
return nil, err return nil, err
} }
what = append(what, w) stm.What[key] = w
} }
for _, w := range what { for _, w := range stm.What {
switch what := w.(type) { switch what := w.(type) {