Tabnine Logo
SchemaBuilder.alterKeyspace
Code IndexAdd Tabnine to your IDE (free)

How to use
alterKeyspace
method
in
com.datastax.driver.core.schemabuilder.SchemaBuilder

Best Java code snippets using com.datastax.driver.core.schemabuilder.SchemaBuilder.alterKeyspace (Showing top 4 results out of 315)

origin: com.datastax.cassandra/cassandra-driver-core

 @Test(groups = "unit", expectedExceptions = IllegalArgumentException.class)
 public void incorrect_replication_options() throws Exception {
  Map<String, Object> replicationOptions = new HashMap<String, Object>();
  replicationOptions.put("class", 5);

  // When
  alterKeyspace("test").with().replication(replicationOptions);
 }
}
origin: com.datastax.cassandra/cassandra-driver-core

@Test(groups = "unit")
public void should_alter_keyspace_with_options() throws Exception {
 Map<String, Object> replicationOptions = new HashMap<String, Object>();
 replicationOptions.put("class", "SimpleStrategy");
 replicationOptions.put("replication_factor", 1);
 // When
 SchemaStatement statement =
   alterKeyspace("test").with().durableWrites(true).replication(replicationOptions);
 // Then
 assertThat(statement.getQueryString())
   .isEqualTo(
     "\n\tALTER KEYSPACE test"
       + "\n\tWITH\n\t\t"
       + "REPLICATION = {'replication_factor': 1, 'class': 'SimpleStrategy'}\n\t\t"
       + "AND DURABLE_WRITES = true");
}
origin: com.datastax.dse/dse-java-driver-core

 @Test(groups = "unit", expectedExceptions = IllegalArgumentException.class)
 public void incorrect_replication_options() throws Exception {
  Map<String, Object> replicationOptions = new HashMap<String, Object>();
  replicationOptions.put("class", 5);

  // When
  alterKeyspace("test").with().replication(replicationOptions);
 }
}
origin: com.datastax.dse/dse-java-driver-core

@Test(groups = "unit")
public void should_alter_keyspace_with_options() throws Exception {
 Map<String, Object> replicationOptions = new HashMap<String, Object>();
 replicationOptions.put("class", "SimpleStrategy");
 replicationOptions.put("replication_factor", 1);
 // When
 SchemaStatement statement =
   alterKeyspace("test").with().durableWrites(true).replication(replicationOptions);
 // Then
 assertThat(statement.getQueryString())
   .isEqualTo(
     "\n\tALTER KEYSPACE test"
       + "\n\tWITH\n\t\t"
       + "REPLICATION = {'replication_factor': 1, 'class': 'SimpleStrategy'}\n\t\t"
       + "AND DURABLE_WRITES = true");
}
com.datastax.driver.core.schemabuilderSchemaBuilderalterKeyspace

Javadoc

Start building a new ALTER KEYSPACE statement.

Popular methods of SchemaBuilder

  • createTable
    Start building a new CREATE TABLE statement.
  • createKeyspace
    Start building a new CREATE KEYSPACE statement.
  • dropKeyspace
    Start building a new DROP KEYSPACE statement.
  • dropTable
    Start building a new DROP TABLE statement.
  • leveledStrategy
    Create options for the leveled compaction strategy, to use in a CREATE or ALTER TABLE statement.
  • lz4
    Create options for the LZ4 compression strategy, to use in a CREATE or ALTER TABLE statement.
  • sizedTieredStategy
    Create options for the size-tiered compaction strategy, for use in a CREATE or ALTER TABLE statement
  • createType
    Start building a new CREATE TYPE statement.
  • noSpeculativeRetry
    Create the speculative retry strategy that never retries reads, to use in a CREATE or ALTER TABLE st
  • createIndex
    Start building a new CREATE INDEX statement.
  • dateTieredStrategy
    Create options for the date-tiered compaction strategy, to use in a CREATE or ALTER TABLE statement.
  • deflate
    Create options for the Deflate compression strategy, to use in a CREATE or ALTER TABLE statement.
  • dateTieredStrategy,
  • deflate,
  • dropType,
  • noCompression,
  • snappy,
  • allRows,
  • alterTable,
  • always,
  • dropIndex

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • runOnUiThread (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JTextField (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now