From a38e33751313850527189c68a637db5279d33c6c Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Fri, 14 Oct 2016 22:21:25 +0100 Subject: [PATCH] Add SQL SCOPE query ast --- sql/ast.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sql/ast.go b/sql/ast.go index ac9adb58..c4f47a64 100644 --- a/sql/ast.go +++ b/sql/ast.go @@ -156,6 +156,28 @@ type RelateStatement struct { Echo Token `cork:"echo" codec:"echo"` } +// -------------------------------------------------- +// Scope +// -------------------------------------------------- + +// DefineScopeStatement represents an SQL DEFINE SCOPE statement. +type DefineScopeStatement struct { + KV string `cork:"-" codec:"-"` + NS string `cork:"-" codec:"-"` + DB string `cork:"-" codec:"-"` + Name string `cork:"name" codec:"name"` + Time time.Duration `cork:"time" codec:"time"` + Opts interface{} `cork:"opts" codec:"opts"` +} + +// RemoveScopeStatement represents an SQL REMOVE SCOPE statement. +type RemoveScopeStatement struct { + KV string `cork:"-" codec:"-"` + NS string `cork:"-" codec:"-"` + DB string `cork:"-" codec:"-"` + Name string `cork:"name" codec:"name"` +} + // -------------------------------------------------- // Table // --------------------------------------------------