Scanner.java (hsqldb-2.6.0) | : | Scanner.java (hsqldb-2.6.1) | ||
---|---|---|---|---|
skipping to change at line 64 | skipping to change at line 64 | |||
import org.hsqldb.types.NumberType; | import org.hsqldb.types.NumberType; | |||
import org.hsqldb.types.TimeData; | import org.hsqldb.types.TimeData; | |||
import org.hsqldb.types.TimestampData; | import org.hsqldb.types.TimestampData; | |||
import org.hsqldb.types.Type; | import org.hsqldb.types.Type; | |||
import org.hsqldb.types.Types; | import org.hsqldb.types.Types; | |||
/** | /** | |||
* Scans for SQL tokens. | * Scans for SQL tokens. | |||
* | * | |||
* @author Fred Toussi (fredt@users dot sourceforge.net) | * @author Fred Toussi (fredt@users dot sourceforge.net) | |||
* @version 2.6.0 | * @version 2.6.1 | |||
* @since 1.9.0 | * @since 1.9.0 | |||
*/ | */ | |||
public class Scanner { | public class Scanner { | |||
/* | /* | |||
<delimiter token> ::= | <delimiter token> ::= | |||
<character string literal> | <character string literal> | |||
| <date string> | | <date string> | |||
| <time string> | | <time string> | |||
| <timestamp string> | | <timestamp string> | |||
skipping to change at line 1155 | skipping to change at line 1155 | |||
} | } | |||
token.dataType = Type.SQL_NUMERIC; | token.dataType = Type.SQL_NUMERIC; | |||
// fall through | // fall through | |||
case Types.SQL_NUMERIC : | case Types.SQL_NUMERIC : | |||
try { | try { | |||
BigDecimal decimal = new BigDecimal(token.tokenString); | BigDecimal decimal = new BigDecimal(token.tokenString); | |||
token.tokenValue = decimal; | token.tokenValue = decimal; | |||
token.dataType = NumberType.getNumberType(Types.NUMERIC, | token.dataType = NumberType.getNumberTypeForLiteral(decimal) | |||
JavaSystem.precision(decimal), decimal.scale()); | ; | |||
} catch (Exception e2) { | } catch (Exception e2) { | |||
token.tokenType = Tokens.X_MALFORMED_NUMERIC; | token.tokenType = Tokens.X_MALFORMED_NUMERIC; | |||
token.isMalformed = true; | token.isMalformed = true; | |||
return; | return; | |||
} | } | |||
return; | return; | |||
case Types.SQL_DOUBLE : | case Types.SQL_DOUBLE : | |||
End of changes. 2 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |