/** * Create a new {@link DropIndexSpecification} for the given {@code indexName}. * * @param indexName must not be {@literal null}. * @return a new {@link DropIndexSpecification}. */ public static DropIndexSpecification dropIndex(CqlIdentifier indexName) { return new DropIndexSpecification(indexName); } }
@Override public StringBuilder toCql(StringBuilder cql) { return cql.append("DROP INDEX ") // .append(spec().getIfExists() ? "IF EXISTS " : "") .append(spec().getName()).append(";"); } }
/** * Create a new {@link DropIndexSpecification} for the given {@code indexName}. * * @param indexName must not be {@literal null} or empty. * @return a new {@link DropIndexSpecification}. */ public static DropIndexSpecification dropIndex(String indexName) { return dropIndex(CqlIdentifier.of(indexName)); }