Allow expressions in SELECT field AS alias clauses

This commit is contained in:
Tobie Morgan Hitchcock 2018-05-30 13:24:45 +01:00
parent c89c80f5fb
commit 7bf408336d

View file

@ -98,7 +98,7 @@ func (p *parser) parseFields() (mul Fields, err error) {
if _, _, exi := p.mightBe(AS); exi {
if _, one.Alias, err = p.shouldBe(IDENT); err != nil {
if _, one.Alias, err = p.shouldBe(IDENT, EXPR); err != nil {
return nil, &ParseError{Found: one.Alias, Expected: []string{"alias name"}}
}