"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "hsqldb/src/org/hsqldb/ExpressionOp.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.

ExpressionOp.java  (hsqldb-2.7.1):ExpressionOp.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 51 skipping to change at line 51
import org.hsqldb.types.DateTimeType; import org.hsqldb.types.DateTimeType;
import org.hsqldb.types.IntervalType; import org.hsqldb.types.IntervalType;
import org.hsqldb.types.Type; import org.hsqldb.types.Type;
import org.hsqldb.types.Types; import org.hsqldb.types.Types;
/** /**
* Implementation of CAST, CASE, LIMIT and ZONE operations. * Implementation of CAST, CASE, LIMIT and ZONE operations.
* *
* @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net)
* @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 ExpressionOp extends Expression { public class ExpressionOp extends Expression {
static final ExpressionOp limitOneExpression = new ExpressionOp( static final ExpressionOp limitOneExpression = new ExpressionOp(
OpTypes.LIMIT, OpTypes.LIMIT,
new ExpressionValue(ValuePool.INTEGER_0, Type.SQL_INTEGER), new ExpressionValue(ValuePool.INTEGER_0, Type.SQL_INTEGER),
new ExpressionValue(ValuePool.INTEGER_1, Type.SQL_INTEGER)); new ExpressionValue(ValuePool.INTEGER_1, Type.SQL_INTEGER));
/** /**
skipping to change at line 769 skipping to change at line 769
nodes[RIGHT].getDataType()); nodes[RIGHT].getDataType());
if (right == null) { if (right == null) {
return null; return null;
} }
if (right.length() != 1) { if (right.length() != 1) {
throw Error.error(ErrorCode.X_22019); throw Error.error(ErrorCode.X_22019);
} }
escapeChar = right.getBytes()[0]; escapeChar = right.charAt(0);
} }
char[] array = left.toCharArray(); char[] array = left.toCharArray();
char[] newArray = new char[array.length]; char[] newArray = new char[array.length];
boolean wasEscape = false; boolean wasEscape = false;
int escapeCount = 0; int escapeCount = 0;
int i = 0; int i = 0;
int j = 0; int j = 0;
for (; i < array.length; i++) { for (; i < array.length; i++) {
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

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