use of org.h2.command.ddl.CreateAggregate in project h2database by h2database.
the class Parser method parseCreateAggregate.
private CreateAggregate parseCreateAggregate(boolean force) {
boolean ifNotExists = readIfNotExists();
CreateAggregate command = new CreateAggregate(session);
command.setForce(force);
String name = readIdentifierWithSchema();
if (isKeyword(name) || Function.getFunction(database, name) != null || getAggregateType(name) != null) {
throw DbException.get(ErrorCode.FUNCTION_ALIAS_ALREADY_EXISTS_1, name);
}
command.setName(name);
command.setSchema(getSchema());
command.setIfNotExists(ifNotExists);
read("FOR");
command.setJavaClassMethod(readUniqueIdentifier());
return command;
}
Aggregations