|
|
|
|
@@ -28,11 +28,11 @@ import org.springframework.cassandra.core.Ordering;
|
|
|
|
|
import com.datastax.driver.core.DataType;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Builder class to help construct CQL statements that involve column manipulation. Not threadsafe.
|
|
|
|
|
* Builder class to specify columns.
|
|
|
|
|
* <p/>
|
|
|
|
|
* Use {@link #name(String)} and {@link #type(String)} to set the name and type of the column, respectively. To specify
|
|
|
|
|
* a <code>PRIMARY KEY</code> column, use {@link #clustered()} or {@link #clustered(Ordering)}. To specify that the
|
|
|
|
|
* <code>PRIMARY KEY</code> column is or is part of the partition key, use {@link #partitioned()} instead of
|
|
|
|
|
* a clustered <code>PRIMARY KEY</code> column, use {@link #clustered()} or {@link #clustered(Ordering)}. To specify
|
|
|
|
|
* that the <code>PRIMARY KEY</code> column is or is part of the partition key, use {@link #partitioned()} instead of
|
|
|
|
|
* {@link #clustered()} or {@link #clustered(Ordering)}.
|
|
|
|
|
*
|
|
|
|
|
* @author Matthew T. Adams
|
|
|
|
|
@@ -105,7 +105,7 @@ public class ColumnSpecification {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Identifies this column as a primary key column with the given ordering. Sets the column's {@link #keyType} to
|
|
|
|
|
* Identifies this column as a clustered key column with the given ordering. Sets the column's {@link #keyType} to
|
|
|
|
|
* {@link PrimaryKeyType#CLUSTERED} and its {@link #ordering} to the given {@link Ordering}.
|
|
|
|
|
*
|
|
|
|
|
* @return this
|
|
|
|
|
@@ -115,8 +115,8 @@ public class ColumnSpecification {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Toggles the identification of this column as a primary key column. If the given boolean is <code>true</code>, then
|
|
|
|
|
* sets the column's {@link #keyType} to {@link PrimaryKeyType#PARTITIONED} and {@link #ordering} to the given
|
|
|
|
|
* Toggles the identification of this column as a clustered key column. If the given boolean is <code>true</code>,
|
|
|
|
|
* then sets the column's {@link #keyType} to {@link PrimaryKeyType#PARTITIONED} and {@link #ordering} to the given
|
|
|
|
|
* {@link Ordering} , else sets both {@link #keyType} and {@link #ordering} to <code>null</code>.
|
|
|
|
|
*
|
|
|
|
|
* @return this
|
|
|
|
|
|