From 09c32c2d647077ab0a2f141b2209aadec4866c74 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Tue, 5 Mar 2019 11:40:08 +0000 Subject: [PATCH] Fix live queries --- db/socket.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/db/socket.go b/db/socket.go index 9530670d..f6135b1e 100644 --- a/db/socket.go +++ b/db/socket.go @@ -243,17 +243,15 @@ func (s *socket) executeLive(e *executor, ctx context.Context, stm *sql.LiveStat // Store the live query in the database layer. - var what sql.Exprs - - for _, val := range stm.What { + for key, val := range stm.What { w, err := e.fetch(ctx, val, nil) if err != nil { return nil, err } - what = append(what, w) + stm.What[key] = w } - for _, w := range what { + for _, w := range stm.What { switch what := w.(type) {