From 1733f84070c9a932d05ceee2910b2fb2140dadbf Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Thu, 3 Nov 2016 17:20:18 +0000 Subject: [PATCH] Enable main SQL commands to be within subqueries --- sql/create.go | 2 +- sql/delete.go | 2 +- sql/relate.go | 2 +- sql/select.go | 2 +- sql/update.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sql/create.go b/sql/create.go index cc3948b9..666b14ad 100644 --- a/sql/create.go +++ b/sql/create.go @@ -36,7 +36,7 @@ func (p *parser) parseCreateStatement() (stmt *CreateStatement, err error) { return nil, err } - if _, _, err = p.shouldBe(EOF, SEMICOLON); err != nil { + if _, _, err = p.shouldBe(EOF, RPAREN, SEMICOLON); err != nil { return nil, err } diff --git a/sql/delete.go b/sql/delete.go index 9b0d465c..67045f08 100644 --- a/sql/delete.go +++ b/sql/delete.go @@ -40,7 +40,7 @@ func (p *parser) parseDeleteStatement() (stmt *DeleteStatement, err error) { return nil, err } - if _, _, err = p.shouldBe(EOF, SEMICOLON); err != nil { + if _, _, err = p.shouldBe(EOF, RPAREN, SEMICOLON); err != nil { return nil, err } diff --git a/sql/relate.go b/sql/relate.go index b43ec746..10f14e07 100644 --- a/sql/relate.go +++ b/sql/relate.go @@ -52,7 +52,7 @@ func (p *parser) parseRelateStatement() (stmt *RelateStatement, err error) { return nil, err } - if _, _, err = p.shouldBe(EOF, SEMICOLON); err != nil { + if _, _, err = p.shouldBe(EOF, RPAREN, SEMICOLON); err != nil { return nil, err } diff --git a/sql/select.go b/sql/select.go index e3526b1e..a0693250 100644 --- a/sql/select.go +++ b/sql/select.go @@ -63,7 +63,7 @@ func (p *parser) parseSelectStatement() (stmt *SelectStatement, err error) { return nil, err } - if _, _, err = p.shouldBe(EOF, SEMICOLON); err != nil { + if _, _, err = p.shouldBe(EOF, RPAREN, SEMICOLON); err != nil { return nil, err } diff --git a/sql/update.go b/sql/update.go index 33cba635..a8cc320c 100644 --- a/sql/update.go +++ b/sql/update.go @@ -40,7 +40,7 @@ func (p *parser) parseUpdateStatement() (stmt *UpdateStatement, err error) { return nil, err } - if _, _, err = p.shouldBe(EOF, SEMICOLON); err != nil { + if _, _, err = p.shouldBe(EOF, RPAREN, SEMICOLON); err != nil { return nil, err }