use of io.crate.exceptions.RepositoryAlreadyExistsException in project crate by crate.
the class CreateRepositoryAnalyzer method analyze.
public CreateRepositoryAnalyzedStatement analyze(CreateRepository node, ParameterContext parameterContext) {
String repositoryName = node.repository();
if (repositoryService.getRepository(repositoryName) != null) {
throw new RepositoryAlreadyExistsException(repositoryName);
}
Settings settings = repositoryParamValidator.convertAndValidate(node.type(), node.properties(), parameterContext);
return new CreateRepositoryAnalyzedStatement(repositoryName, node.type(), settings);
}
Aggregations