command.setForce(force); command.setAliasName(aliasName); command.setIfNotExists(ifNotExists); command.setDeterministic(readIf("DETERMINISTIC")); command.setBufferResultSetToLocalTemp(!readIf("NOBUFFER"));
private CreateFunctionAlias parseCreateFunctionAlias(boolean force) throws SQLException { boolean ifNotExists = readIfNoExists(); CreateFunctionAlias command = new CreateFunctionAlias(session); command.setForce(force); String name = readUniqueIdentifier(); if (isKeyword(name) || Function.getFunction(database, name) != null || Aggregate.getAggregateType(name) >= 0) { throw Message.getSQLException(ErrorCode.FUNCTION_ALIAS_ALREADY_EXISTS_1, name); } command.setAliasName(name); command.setIfNotExists(ifNotExists); read("FOR"); command.setJavaClassMethod(readUniqueIdentifier()); return command; }
private CreateFunctionAlias parseCreateFunctionAlias(boolean force) { boolean ifNotExists = readIfNotExists(); String aliasName = readIdentifierWithSchema(); if (isKeyword(aliasName) || Function.getFunction(database, aliasName) != null || getAggregateType(aliasName) >= 0) { throw DbException.get(ErrorCode.FUNCTION_ALIAS_ALREADY_EXISTS_1, aliasName); } CreateFunctionAlias command = new CreateFunctionAlias(session, getSchema()); command.setForce(force); command.setAliasName(aliasName); command.setIfNotExists(ifNotExists); command.setDeterministic(readIf("DETERMINISTIC")); command.setBufferResultSetToLocalTemp(!readIf("NOBUFFER")); if (readIf("AS")) { command.setSource(readString()); } else { read("FOR"); command.setJavaClassMethod(readUniqueIdentifier()); } return command; }
private CreateFunctionAlias parseCreateFunctionAlias(boolean force) { boolean ifNotExists = readIfNotExists(); String aliasName = readIdentifierWithSchema(); if (isKeyword(aliasName) || Function.getFunction(database, aliasName) != null || getAggregateType(aliasName) >= 0) { throw DbException.get(ErrorCode.FUNCTION_ALIAS_ALREADY_EXISTS_1, aliasName); } CreateFunctionAlias command = new CreateFunctionAlias(session, getSchema()); command.setForce(force); command.setAliasName(aliasName); command.setIfNotExists(ifNotExists); command.setDeterministic(readIf("DETERMINISTIC")); command.setBufferResultSetToLocalTemp(!readIf("NOBUFFER")); if (readIf("AS")) { command.setSource(readString()); } else { read("FOR"); command.setJavaClassMethod(readUniqueIdentifier()); } return command; }