String s = token.tokenString;
read();
TimeData value = scanner.newTime(s);
Type dataType = scanner.dateTimeType;
return new ExpressionValue(value, dataType);
}
case Tokens.TIMESTAMP : {
read();
if (token.tokenType != Tokens.X_VALUE
|| token.dataType.typeCode != Types.SQL_CHAR) {
break;
}
String s = token.tokenString;
read();
Object date = scanner.newTimestamp(s);
Type dataType = scanner.dateTimeType;
return new ExpressionValue(date, dataType);
}
case Tokens.INTERVAL : {
boolean minus = false;
read();
if (token.tokenType == Tokens.MINUS) {
read();
minus = true;
} else if (token.tokenType == Tokens.PLUS) {
read();
}
if (token.tokenType != Tokens.X_VALUE
|| token.dataType.typeCode != Types.SQL_CHAR) {
break;
}
String s = token.tokenString;
read();
IntervalType dataType = readIntervalType();
Object interval = scanner.newInterval(s, dataType);
dataType = (IntervalType) scanner.dateTimeType;
if (minus) {
interval = dataType.negate(interval);
}
return new ExpressionValue(interval, dataType);
}
default :