Class CreateIndex
- java.lang.Object
-
- com.datastax.driver.core.schemabuilder.CreateIndex
-
public class CreateIndex extends Object
A built CREATE INDEX statement.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classCreateIndex.CreateIndexOn
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbuildInternal()CreateIndexifNotExists()Add the 'IF NOT EXISTS' condition to this CREATE INDEX statement.CreateIndex.CreateIndexOnonTable(String tableName)Specify the table to create the index on.CreateIndex.CreateIndexOnonTable(String keyspaceName, String tableName)Specify the keyspace and table to create the index on.
-
-
-
Method Detail
-
ifNotExists
public CreateIndex ifNotExists()
Add the 'IF NOT EXISTS' condition to this CREATE INDEX statement.- Returns:
- this CREATE INDEX statement.
-
onTable
public CreateIndex.CreateIndexOn onTable(String keyspaceName, String tableName)
Specify the keyspace and table to create the index on.- Parameters:
keyspaceName- the keyspace name.tableName- the table name.- Returns:
- a
CreateIndex.CreateIndexOnthat will allow the specification of the column.
-
onTable
public CreateIndex.CreateIndexOn onTable(String tableName)
Specify the table to create the index on.- Parameters:
tableName- the table name.- Returns:
- a
CreateIndex.CreateIndexOnthat will allow the specification of the column.
-
buildInternal
public String buildInternal()
-
-