/** * Entry point into the {@link AlterKeyspaceSpecification}'s fluent API given {@code name} to alter a keyspace. * Convenient if imported statically. * * @param name must not be {@literal null} or empty. * @return a new {@link AlterKeyspaceSpecification}. */ public static AlterKeyspaceSpecification alterKeyspace(KeyspaceIdentifier name) { return new AlterKeyspaceSpecification(name); } }
/** * Generate a {@link AlterKeyspaceSpecification} for the keyspace. * * @return the {@link AlterKeyspaceSpecification}. * @since 2.0.1 */ public KeyspaceActionSpecification alter() { AlterKeyspaceSpecification alter = AlterKeyspaceSpecification.alterKeyspace(name) .with(KeyspaceOption.DURABLE_WRITES, durableWrites); Map<Option, Object> replication = getReplication(); if (!replication.isEmpty()) { alter.with(KeyspaceOption.REPLICATION, replication); } return alter; }
/** * Entry point into the {@link AlterKeyspaceSpecification}'s fluent API given {@code name} to alter a keyspace. * Convenient if imported statically. * * @param name must not be {@literal null} or empty. * @return a new {@link AlterKeyspaceSpecification}. */ public static AlterKeyspaceSpecification alterKeyspace(String name) { return alterKeyspace(KeyspaceIdentifier.of(name)); }
private void preambleCql(StringBuilder cql) { cql.append("ALTER KEYSPACE ").append(spec().getName()).append(" "); }
Map<String, Object> options = spec().getOptions();