"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "hsqldb/src/org/hsqldb/FunctionCustom.java" between
hsqldb-2.6.0.zip and hsqldb-2.6.1.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.

FunctionCustom.java  (hsqldb-2.6.0):FunctionCustom.java  (hsqldb-2.6.1)
skipping to change at line 79 skipping to change at line 79
import org.hsqldb.types.Type; import org.hsqldb.types.Type;
import org.hsqldb.types.Types; import org.hsqldb.types.Types;
/** /**
* Implementation of HSQLDB functions that are not defined by the * Implementation of HSQLDB functions that are not defined by the
* SQL standard.<p> * SQL standard.<p>
* *
* Some functions are translated into equivalent SQL Standard functions. * Some functions are translated into equivalent SQL Standard functions.
* *
* @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 FunctionCustom extends FunctionSQL { public class FunctionCustom extends FunctionSQL {
private static final int FUNC_ACOS = 71; private static final int FUNC_ACOS = 71;
private static final int FUNC_ACTION_ID = 72; private static final int FUNC_ACTION_ID = 72;
private static final int FUNC_ADD_MONTHS = 73; private static final int FUNC_ADD_MONTHS = 73;
private static final int FUNC_ASCII = 74; private static final int FUNC_ASCII = 74;
private static final int FUNC_ASCIISTR = 75; private static final int FUNC_ASCIISTR = 75;
private static final int FUNC_ASIN = 76; private static final int FUNC_ASIN = 76;
skipping to change at line 2138 skipping to change at line 2138
break; break;
} }
if (data[i] == null) { if (data[i] == null) {
return null; return null;
} }
} }
int flags = FunctionCustom.regexpParams((String) data[5]); int flags = FunctionCustom.regexpParams((String) data[5]);
Pattern currentPattern; Pattern currentPattern;
String source = (String) data[0]; String source = (String) data[0];
String matchPattern = (String) data[1]; String matchPattern = (String) data[1];
String replace = (String) data[2]; String replace = (String) data[2];
int start = 1; int start = 1;
int count = 0; int count = 0;
if (nodes[2] == null) { if (nodes[2] == null) {
replace = ""; replace = "";
} }
if (nodes[3] != null) { if (nodes[3] != null) {
start = ((Number) data[3]).intValue(); start = ((Number) data[3]).intValue();
if (start < 1 || start >= source.length()) { if (start < 1 || start >= source.length()) {
throw Error.error(ErrorCode.X_22003); throw Error.error(ErrorCode.X_22003);
skipping to change at line 4342 skipping to change at line 4342
return sb.toString(); return sb.toString();
} }
default : default :
return super.getSQL(); return super.getSQL();
} }
} }
private String getSQLSimple() { private String getSQLSimple() {
StringBuilder sb = new StringBuilder(name).append('('); StringBuilder sb = new StringBuilder(name).append('(');
boolean added = false;
for (int i = 0; i < nodes.length; i++) { for (int i = 0; i < nodes.length; i++) {
if (i > 0) { if (nodes[i] != null) {
sb.append(','); if (added) {
} sb.append(',');
}
sb.append(nodes[i].getSQL());
sb.append(nodes[i].getSQL()); added = true;
}
} }
sb.append(')'); sb.append(')');
return sb.toString(); return sb.toString();
} }
/** /**
* Returns a four character code representing the sound of the given * Returns a four character code representing the sound of the given
* <code>String</code>. Non-ASCCI characters in the * <code>String</code>. Non-ASCCI characters in the
 End of changes. 5 change blocks. 
11 lines changed or deleted 16 lines changed or added

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