"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "hsqldb/src/org/hsqldb/ParserCommand.java" between
hsqldb-2.7.1.zip and hsqldb-2.7.2.zip

About: HSQLDB (HyperSQL DataBase) is a SQL relational database engine written in Java. It supports nearly full ANSI-92 SQL (BNF format) and full core SQL:2008.

ParserCommand.java  (hsqldb-2.7.1):ParserCommand.java  (hsqldb-2.7.2)
/* Copyright (c) 2001-2022, The HSQL Development Group /* Copyright (c) 2001-2023, The HSQL Development Group
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* *
* Redistributions of source code must retain the above copyright notice, this * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
skipping to change at line 56 skipping to change at line 56
import org.hsqldb.types.Charset; import org.hsqldb.types.Charset;
import org.hsqldb.types.DateTimeType; import org.hsqldb.types.DateTimeType;
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;
/** /**
* Parser for session and management statements * Parser for session and management statements
* *
* @author Fred Toussi (fredt@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net)
* @version 2.7.0 * @version 2.7.2
* @since 1.9.0 * @since 1.9.0
*/ */
public class ParserCommand extends ParserDDL { public class ParserCommand extends ParserDDL {
ParserCommand(Session session, Scanner t) { ParserCommand(Session session, Scanner t) {
super(session, t); super(session, t);
} }
Statement compileStatement(int props) { Statement compileStatement(int props) {
skipping to change at line 2261 skipping to change at line 2261
} }
} }
private Statement compileSetRole() { private Statement compileSetRole() {
Expression e; Expression e;
if (token.tokenType == Tokens.NONE) { if (token.tokenType == Tokens.NONE) {
read(); read();
e = new ExpressionValue(null, Type.SQL_VARCHAR); e = null;
} else { } else {
e = XreadValueSpecificationOrNull(); e = XreadValueSpecificationOrNull();
if (e == null) { if (e == null) {
throw Error.error(ErrorCode.X_2A000); throw Error.error(ErrorCode.X_2A000);
} }
if (!e.getDataType().isCharacterType()) {
throw Error.error(ErrorCode.X_0P000);
}
if (e.getType() != OpTypes.VALUE
&& (e.getType() != OpTypes.SQL_FUNCTION
|| !((FunctionSQL) e).isValueFunction())) {
throw Error.error(ErrorCode.X_0P000);
}
} }
return new StatementSession(session, compileContext, return new StatementSession(session, compileContext,
StatementTypes.SET_ROLE, StatementTypes.SET_ROLE,
new Expression[]{ e }); new Expression[]{ e });
} }
private Statement compileSetTimeZone() { private Statement compileSetTimeZone() {
Expression e; Expression e;
 End of changes. 4 change blocks. 
13 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)