types: add timestamp type

This commit is contained in:
Asdine El Hrychy
2023-11-28 07:34:49 +04:00
parent 84a6c9e76f
commit 986a493fcf
33 changed files with 588 additions and 42 deletions

View File

@@ -452,6 +452,8 @@ func (p *Parser) parseType() (types.ValueType, error) {
return types.IntegerValue, nil
case scanner.TYPETEXT:
return types.TextValue, nil
case scanner.TYPETIMESTAMP:
return types.TimestampValue, nil
case scanner.TYPEVARCHAR, scanner.TYPECHARACTER:
if tok, pos, lit := p.ScanIgnoreWhitespace(); tok != scanner.LPAREN {
return 0, newParseError(scanner.Tokstr(tok, lit), []string{"("}, pos)