From dacf7b954b70e375923dfa4d2a76ff7cd91c0430 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Fri, 28 Apr 2017 17:07:38 +0100 Subject: [PATCH] Enable WITH aswell as TO in RELATE clause --- sql/relate.go | 2 +- sql/tokens.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/relate.go b/sql/relate.go index 89fd4b56..9edc26a0 100644 --- a/sql/relate.go +++ b/sql/relate.go @@ -34,7 +34,7 @@ func (p *parser) parseRelateStatement() (stmt *RelateStatement, err error) { return nil, err } - if _, _, err = p.shouldBe(TO); err != nil { + if _, _, err = p.shouldBe(TO, WITH); err != nil { return nil, err } diff --git a/sql/tokens.go b/sql/tokens.go index 372300f2..e8deec32 100644 --- a/sql/tokens.go +++ b/sql/tokens.go @@ -197,6 +197,7 @@ const ( VIEW VOID WHERE + WITH keywordsEnd ) @@ -366,6 +367,7 @@ var tokens = [...]string{ VIEW: "VIEW", VOID: "VOID", WHERE: "WHERE", + WITH: "WITH", } var literals map[string]Token