Class CreateIndexStatement
- java.lang.Object
-
- org.apache.cassandra.cql3.statements.schema.AlterSchemaStatement
-
- org.apache.cassandra.cql3.statements.schema.CreateIndexStatement
-
- All Implemented Interfaces:
CQLStatement
,CQLStatement.SingleKeyspaceCqlStatement
,SchemaTransformation
public final class CreateIndexStatement extends AlterSchemaStatement
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CreateIndexStatement.Raw
-
Nested classes/interfaces inherited from interface org.apache.cassandra.cql3.CQLStatement
CQLStatement.SingleKeyspaceCqlStatement
-
Nested classes/interfaces inherited from interface org.apache.cassandra.schema.SchemaTransformation
SchemaTransformation.SchemaTransformationResult
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.cql3.statements.schema.AlterSchemaStatement
keyspaceName
-
-
Constructor Summary
Constructors Constructor Description CreateIndexStatement(java.lang.String keyspaceName, java.lang.String tableName, java.lang.String indexName, java.util.List<IndexTarget.Raw> rawIndexTargets, IndexAttributes attrs, boolean ifNotExists)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Keyspaces
apply(Keyspaces schema)
Apply a statement transformation to a schema snapshot.void
authorize(ClientState client)
Perform any access verification necessary for the statement.AuditLogContext
getAuditLogContext()
Provides the context needed for audit logging statements.java.lang.String
toString()
void
validate(ClientState state)
Perform additional validation required by the statment.-
Methods inherited from class org.apache.cassandra.cql3.statements.schema.AlterSchemaStatement
execute, execute, executeLocally, keyspace, validateDefaultTimeToLive
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.cql3.CQLStatement
getBindVariables, getFunctions, getPartitionKeyBindVariableIndexes, hasConditions
-
Methods inherited from interface org.apache.cassandra.schema.SchemaTransformation
fixedTimestampMicros
-
-
-
-
Field Detail
-
SASI_INDEX_DISABLED
public static final java.lang.String SASI_INDEX_DISABLED
- See Also:
- Constant Field Values
-
KEYSPACE_DOES_NOT_EXIST
public static final java.lang.String KEYSPACE_DOES_NOT_EXIST
- See Also:
- Constant Field Values
-
TABLE_DOES_NOT_EXIST
public static final java.lang.String TABLE_DOES_NOT_EXIST
- See Also:
- Constant Field Values
-
COUNTER_TABLES_NOT_SUPPORTED
public static final java.lang.String COUNTER_TABLES_NOT_SUPPORTED
- See Also:
- Constant Field Values
-
MATERIALIZED_VIEWS_NOT_SUPPORTED
public static final java.lang.String MATERIALIZED_VIEWS_NOT_SUPPORTED
- See Also:
- Constant Field Values
-
TRANSIENTLY_REPLICATED_KEYSPACE_NOT_SUPPORTED
public static final java.lang.String TRANSIENTLY_REPLICATED_KEYSPACE_NOT_SUPPORTED
- See Also:
- Constant Field Values
-
CUSTOM_CREATE_WITHOUT_COLUMN
public static final java.lang.String CUSTOM_CREATE_WITHOUT_COLUMN
- See Also:
- Constant Field Values
-
CUSTOM_MULTIPLE_COLUMNS
public static final java.lang.String CUSTOM_MULTIPLE_COLUMNS
- See Also:
- Constant Field Values
-
DUPLICATE_TARGET_COLUMN
public static final java.lang.String DUPLICATE_TARGET_COLUMN
- See Also:
- Constant Field Values
-
COLUMN_DOES_NOT_EXIST
public static final java.lang.String COLUMN_DOES_NOT_EXIST
- See Also:
- Constant Field Values
-
INVALID_CUSTOM_INDEX_TARGET
public static final java.lang.String INVALID_CUSTOM_INDEX_TARGET
- See Also:
- Constant Field Values
-
COLLECTIONS_WITH_DURATIONS_NOT_SUPPORTED
public static final java.lang.String COLLECTIONS_WITH_DURATIONS_NOT_SUPPORTED
- See Also:
- Constant Field Values
-
TUPLES_WITH_DURATIONS_NOT_SUPPORTED
public static final java.lang.String TUPLES_WITH_DURATIONS_NOT_SUPPORTED
- See Also:
- Constant Field Values
-
DURATIONS_NOT_SUPPORTED
public static final java.lang.String DURATIONS_NOT_SUPPORTED
- See Also:
- Constant Field Values
-
UDTS_WITH_DURATIONS_NOT_SUPPORTED
public static final java.lang.String UDTS_WITH_DURATIONS_NOT_SUPPORTED
- See Also:
- Constant Field Values
-
PRIMARY_KEY_IN_COMPACT_STORAGE
public static final java.lang.String PRIMARY_KEY_IN_COMPACT_STORAGE
- See Also:
- Constant Field Values
-
COMPACT_COLUMN_IN_COMPACT_STORAGE
public static final java.lang.String COMPACT_COLUMN_IN_COMPACT_STORAGE
- See Also:
- Constant Field Values
-
ONLY_PARTITION_KEY
public static final java.lang.String ONLY_PARTITION_KEY
- See Also:
- Constant Field Values
-
CREATE_ON_FROZEN_COLUMN
public static final java.lang.String CREATE_ON_FROZEN_COLUMN
- See Also:
- Constant Field Values
-
FULL_ON_FROZEN_COLLECTIONS
public static final java.lang.String FULL_ON_FROZEN_COLLECTIONS
- See Also:
- Constant Field Values
-
NON_COLLECTION_SIMPLE_INDEX
public static final java.lang.String NON_COLLECTION_SIMPLE_INDEX
- See Also:
- Constant Field Values
-
CREATE_WITH_NON_MAP_TYPE
public static final java.lang.String CREATE_WITH_NON_MAP_TYPE
- See Also:
- Constant Field Values
-
CREATE_ON_NON_FROZEN_UDT
public static final java.lang.String CREATE_ON_NON_FROZEN_UDT
- See Also:
- Constant Field Values
-
INDEX_ALREADY_EXISTS
public static final java.lang.String INDEX_ALREADY_EXISTS
- See Also:
- Constant Field Values
-
INDEX_DUPLICATE_OF_EXISTING
public static final java.lang.String INDEX_DUPLICATE_OF_EXISTING
- See Also:
- Constant Field Values
-
KEYSPACE_DOES_NOT_MATCH_TABLE
public static final java.lang.String KEYSPACE_DOES_NOT_MATCH_TABLE
- See Also:
- Constant Field Values
-
KEYSPACE_DOES_NOT_MATCH_INDEX
public static final java.lang.String KEYSPACE_DOES_NOT_MATCH_INDEX
- See Also:
- Constant Field Values
-
MUST_SPECIFY_INDEX_IMPLEMENTATION
public static final java.lang.String MUST_SPECIFY_INDEX_IMPLEMENTATION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CreateIndexStatement
public CreateIndexStatement(java.lang.String keyspaceName, java.lang.String tableName, java.lang.String indexName, java.util.List<IndexTarget.Raw> rawIndexTargets, IndexAttributes attrs, boolean ifNotExists)
-
-
Method Detail
-
validate
public void validate(ClientState state)
Description copied from interface:CQLStatement
Perform additional validation required by the statment. To be overriden by subclasses if needed.- Specified by:
validate
in interfaceCQLStatement
- Overrides:
validate
in classAlterSchemaStatement
- Parameters:
state
- the current client state
-
apply
public Keyspaces apply(Keyspaces schema)
Description copied from interface:SchemaTransformation
Apply a statement transformation to a schema snapshot.Implementing methods should be side-effect free (outside of throwing exceptions if the transformation cannot be successfully applied to the provided schema).
- Parameters:
schema
- Keyspaces to base the transformation on- Returns:
- Keyspaces transformed by the statement
-
authorize
public void authorize(ClientState client)
Description copied from interface:CQLStatement
Perform any access verification necessary for the statement.- Parameters:
client
- the current client state
-
getAuditLogContext
public AuditLogContext getAuditLogContext()
Description copied from interface:CQLStatement
Provides the context needed for audit logging statements.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-