Allow proper field names when removing a field

This commit is contained in:
Tobie Morgan Hitchcock 2018-04-27 00:41:28 +01:00
parent 444a38986a
commit 1a37472f3f
2 changed files with 2 additions and 2 deletions

View file

@ -85,7 +85,7 @@ func (p *parser) parseRemoveFieldStatement() (stmt *RemoveFieldStatement, err er
return nil, err return nil, err
} }
if stmt.Name, err = p.parseIdent(); err != nil { if stmt.Name, err = p.parseIdiom(); err != nil {
return nil, err return nil, err
} }

View file

@ -3189,7 +3189,7 @@ func Test_Parse_Queries_Remove(t *testing.T) {
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
{ {
sql: `REMOVE FIELD`, sql: `REMOVE FIELD`,
err: "Found `` but expected `name`", err: "Found `` but expected `name, or expression`",
}, },
{ {
sql: `REMOVE FIELD temp`, sql: `REMOVE FIELD temp`,