From 1a37472f3f2872b782cd950afee54406c254d7fc Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Fri, 27 Apr 2018 00:41:28 +0100 Subject: [PATCH] Allow proper field names when removing a field --- sql/field.go | 2 +- sql/sql_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/field.go b/sql/field.go index 3e55c7b6..c9672c87 100644 --- a/sql/field.go +++ b/sql/field.go @@ -85,7 +85,7 @@ func (p *parser) parseRemoveFieldStatement() (stmt *RemoveFieldStatement, err er return nil, err } - if stmt.Name, err = p.parseIdent(); err != nil { + if stmt.Name, err = p.parseIdiom(); err != nil { return nil, err } diff --git a/sql/sql_test.go b/sql/sql_test.go index 1b7b187b..392aecb0 100644 --- a/sql/sql_test.go +++ b/sql/sql_test.go @@ -3189,7 +3189,7 @@ func Test_Parse_Queries_Remove(t *testing.T) { // ---------------------------------------------------------------------- { sql: `REMOVE FIELD`, - err: "Found `` but expected `name`", + err: "Found `` but expected `name, or expression`", }, { sql: `REMOVE FIELD temp`,