提交 12c060fc authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting

上级 6f5fa525
......@@ -46,9 +46,11 @@ public class CreateFunctionAlias extends SchemaCommand {
int id = getObjectId();
FunctionAlias functionAlias;
if (javaClassMethod != null) {
functionAlias = FunctionAlias.newInstance(getSchema(), id, aliasName, javaClassMethod, force, bufferResultSetToLocalTemp);
functionAlias = FunctionAlias.newInstance(
getSchema(), id, aliasName, javaClassMethod, force, bufferResultSetToLocalTemp);
} else {
functionAlias = FunctionAlias.newInstanceFromSource(getSchema(), id, aliasName, source, force, bufferResultSetToLocalTemp);
functionAlias = FunctionAlias.newInstanceFromSource(
getSchema(), id, aliasName, source, force, bufferResultSetToLocalTemp);
}
functionAlias.setDeterministic(deterministic);
db.addSchemaObject(session, functionAlias);
......@@ -83,6 +85,8 @@ public class CreateFunctionAlias extends SchemaCommand {
/**
* Should the return value ResultSet be buffered in a local temporary file?
*
* @param b the new value
*/
public void setBufferResultSetToLocalTemp(boolean b) {
this.bufferResultSetToLocalTemp = b;
......
......@@ -110,9 +110,6 @@ public class Set extends Prepared {
}
case SetTypes.COLLATION: {
session.getUser().checkAdmin();
final boolean binaryUnsigned = database.getCompareMode().isBinaryUnsigned();
CompareMode compareMode;
StringBuilder buff = new StringBuilder(stringValue);
......
......@@ -60,9 +60,12 @@ public class FunctionAlias extends SchemaObjectBase {
* @param name the name
* @param javaClassMethod the class and method name
* @param force create the object even if the class or method does not exist
* @param bufferResultSetToLocalTemp whether the result should be buffered
* @return the database object
*/
public static FunctionAlias newInstance(Schema schema, int id, String name, String javaClassMethod, boolean force, boolean bufferResultSetToLocalTemp) {
public static FunctionAlias newInstance(
Schema schema, int id, String name, String javaClassMethod,
boolean force, boolean bufferResultSetToLocalTemp) {
FunctionAlias alias = new FunctionAlias(schema, id, name);
int paren = javaClassMethod.indexOf('(');
int lastDot = javaClassMethod.lastIndexOf('.', paren < 0 ? javaClassMethod.length() : paren);
......@@ -84,9 +87,12 @@ public class FunctionAlias extends SchemaObjectBase {
* @param name the name
* @param source the source code
* @param force create the object even if the class or method does not exist
* @param bufferResultSetToLocalTemp whether the result should be buffered
* @return the database object
*/
public static FunctionAlias newInstanceFromSource(Schema schema, int id, String name, String source, boolean force, boolean bufferResultSetToLocalTemp) {
public static FunctionAlias newInstanceFromSource(
Schema schema, int id, String name, String source, boolean force,
boolean bufferResultSetToLocalTemp) {
FunctionAlias alias = new FunctionAlias(schema, id, name);
alias.source = source;
alias.bufferResultSetToLocalTemp = bufferResultSetToLocalTemp;
......@@ -513,6 +519,8 @@ public class FunctionAlias extends SchemaObjectBase {
/**
* Should the return value ResultSet be buffered in a local temporary file?
*
* @return true if yes
*/
public boolean isBufferResultSetToLocalTemp() {
return bufferResultSetToLocalTemp;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论