public final class CreateTableStatement
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CreateTableStatement.Raw |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
keyspaceName |
Constructor and Description |
---|
CreateTableStatement(java.lang.String keyspaceName,
java.lang.String tableName,
java.util.Map<ColumnIdentifier,CQL3Type.Raw> rawColumns,
java.util.Set<ColumnIdentifier> staticColumns,
java.util.List<ColumnIdentifier> partitionKeyColumns,
java.util.List<ColumnIdentifier> clusteringColumns,
java.util.LinkedHashMap<ColumnIdentifier,java.lang.Boolean> clusteringOrder,
TableAttributes attrs,
boolean ifNotExists,
boolean useCompactStorage) |
Modifier and Type | Method and 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.
|
TableMetadata.Builder |
builder(Types types) |
java.util.Set<java.lang.String> |
clientWarnings(Keyspaces.KeyspacesDiff diff)
Schema alteration might produce a client warning (e.g.
|
ResultMessage |
execute(QueryState state,
boolean locally) |
ResultMessage |
execute(QueryState state,
QueryOptions options,
long queryStartNanoTime)
Execute the statement and return the resulting result or null if there is no result.
|
ResultMessage |
executeLocally(QueryState state,
QueryOptions options)
Variant of execute used for internal query against the system tables, and thus only query the local node.
|
AuditLogContext |
getAuditLogContext()
Provides the context needed for audit logging statements.
|
static TableMetadata.Builder |
parse(java.lang.String cql,
java.lang.String keyspace) |
java.lang.String |
toString() |
void |
validate(ClientState state)
Perform additional validation required by the statment.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBindVariables, getFunctions, getPartitionKeyBindVariableIndexes, hasConditions
public CreateTableStatement(java.lang.String keyspaceName, java.lang.String tableName, java.util.Map<ColumnIdentifier,CQL3Type.Raw> rawColumns, java.util.Set<ColumnIdentifier> staticColumns, java.util.List<ColumnIdentifier> partitionKeyColumns, java.util.List<ColumnIdentifier> clusteringColumns, java.util.LinkedHashMap<ColumnIdentifier,java.lang.Boolean> clusteringOrder, TableAttributes attrs, boolean ifNotExists, boolean useCompactStorage)
public Keyspaces apply(Keyspaces schema)
SchemaTransformation
schema
- Keyspaces to base the transformation onpublic void authorize(ClientState client)
CQLStatement
client
- the current client statepublic AuditLogContext getAuditLogContext()
CQLStatement
public java.lang.String toString()
toString
in class java.lang.Object
public TableMetadata.Builder builder(Types types)
public java.util.Set<java.lang.String> clientWarnings(Keyspaces.KeyspacesDiff diff)
public static TableMetadata.Builder parse(java.lang.String cql, java.lang.String keyspace)
public final void validate(ClientState state)
CQLStatement
validate
in interface CQLStatement
state
- the current client statepublic ResultMessage execute(QueryState state, QueryOptions options, long queryStartNanoTime)
CQLStatement
execute
in interface CQLStatement
state
- the current query stateoptions
- options for this query (consistency, variables, pageSize, ...)queryStartNanoTime
- the timestamp returned by System.nanoTime() when this statement was receivedpublic ResultMessage executeLocally(QueryState state, QueryOptions options)
CQLStatement
executeLocally
in interface CQLStatement
state
- the current query statepublic ResultMessage execute(QueryState state, boolean locally)
Copyright © 2009-2021 The Apache Software Foundation