If no TYPE is found on SQL DEFINE FIELD default to “any”

This commit is contained in:
Tobie Morgan Hitchcock 2016-11-21 18:52:12 +00:00
parent dfb10a6316
commit b25ce6d059

View file

@ -122,7 +122,7 @@ func (p *parser) parseDefineFieldStatement() (stmt *DefineFieldStatement, err er
} }
if stmt.Type == "" { if stmt.Type == "" {
return nil, &ParseError{Found: "", Expected: []string{"TYPE"}} stmt.Type = "any"
} }
if _, _, err = p.shouldBe(EOF, SEMICOLON); err != nil { if _, _, err = p.shouldBe(EOF, SEMICOLON); err != nil {