From b0ab86c4ef00f471a9b7ef84e1fe49a855c9a4dd Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Fri, 4 Nov 2016 11:15:05 +0000 Subject: [PATCH] Add KV, NS, DB to LET and RETURN SQL ASTs All queries which manipulate the data layer in any way, should at least store the authenticated/selected NS and DB options, even if they do not actually use them when running the SQL statement. --- sql/ast.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sql/ast.go b/sql/ast.go index 16ea1eec..ca354332 100644 --- a/sql/ast.go +++ b/sql/ast.go @@ -75,13 +75,19 @@ type InfoStatement struct { // LetStatement represents a SQL LET statement. type LetStatement struct { + KV string `cork:"-" codec:"-"` + NS string `cork:"-" codec:"-"` + DB string `cork:"-" codec:"-"` Name string `cork:"-" codec:"-"` What Expr `cork:"-" codec:"-"` } // ReturnStatement represents a SQL RETURN statement. type ReturnStatement struct { - What Expr `cork:"-" codec:"-"` + KV string `cork:"-" codec:"-"` + NS string `cork:"-" codec:"-"` + DB string `cork:"-" codec:"-"` + What Expr `cork:"-" codec:"-"` } // --------------------------------------------------