public abstract class DescribeStatement<T> extends CQLStatement.Raw implements CQLStatement
DESCRIBE statements parsed from a CQL statement.| Modifier and Type | Class and Description |
|---|---|
static class |
DescribeStatement.Element
DescribeStatement implementation used for describe queries for a single schema element. |
static class |
DescribeStatement.Listing
DescribeStatement implementation used for describe queries that only list elements names. |
CQLStatement.RawbindVariables| Constructor and Description |
|---|
DescribeStatement() |
| Modifier and Type | Method and Description |
|---|---|
static DescribeStatement<SchemaElement> |
aggregate(java.lang.String keyspace,
java.lang.String name)
Creates a
DescribeStatement for DESCRIBE FUNCTION. |
static DescribeStatement<SchemaElement> |
aggregates()
Creates a
DescribeStatement for DESCRIBE AGGREGATES. |
void |
authorize(ClientState state)
Perform any access verification necessary for the statement.
|
static DescribeStatement<java.util.List<java.lang.Object>> |
cluster()
Creates a
DescribeStatement for DESCRIBE CLUSTER. |
protected abstract java.util.stream.Stream<? extends T> |
describe(ClientState state,
Keyspaces keyspaces)
Returns the schema elements that must be part of the output.
|
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.
|
static DescribeStatement<SchemaElement> |
function(java.lang.String keyspace,
java.lang.String name)
Creates a
DescribeStatement for DESCRIBE FUNCTION. |
static DescribeStatement<SchemaElement> |
functions()
Creates a
DescribeStatement for DESCRIBE FUNCTIONS. |
static DescribeStatement<SchemaElement> |
generic(java.lang.String keyspace,
java.lang.String name)
Creates a
DescribeStatement for the generic DESCRIBE .... |
AuditLogContext |
getAuditLogContext()
Provides the context needed for audit logging statements.
|
java.util.List<ColumnSpecification> |
getBindVariables()
Returns all bind variables for the statement
|
static DescribeStatement<SchemaElement> |
index(java.lang.String keyspace,
java.lang.String name)
Creates a
DescribeStatement for DESCRIBE INDEX. |
static DescribeStatement<SchemaElement> |
keyspace(java.lang.String keyspace,
boolean onlyKeyspaceDefinition)
Creates a
DescribeStatement for DESCRIBE KEYSPACE. |
static DescribeStatement<SchemaElement> |
keyspaces()
Creates a
DescribeStatement for DESCRIBE KEYSPACES. |
protected abstract java.util.List<ColumnSpecification> |
metadata(ClientState state)
Returns the columns of the
ResultMetadata |
CQLStatement |
prepare(ClientState clientState) |
static DescribeStatement<SchemaElement> |
schema(boolean includeSystemKeyspaces)
Creates a
DescribeStatement for DESCRIBE [FULL] SCHEMA. |
static DescribeStatement<SchemaElement> |
table(java.lang.String keyspace,
java.lang.String name)
Creates a
DescribeStatement for DESCRIBE TABLE. |
static DescribeStatement<SchemaElement> |
tables()
Creates a
DescribeStatement for DESCRIBE TABLES. |
protected abstract java.util.List<java.nio.ByteBuffer> |
toRow(T element,
boolean withInternals) |
static DescribeStatement<SchemaElement> |
type(java.lang.String keyspace,
java.lang.String name)
Creates a
DescribeStatement for DESCRIBE TYPE. |
static DescribeStatement<SchemaElement> |
types()
Creates a
DescribeStatement for DESCRIBE TYPES. |
void |
validate(ClientState state)
Perform additional validation required by the statment.
|
static DescribeStatement<SchemaElement> |
view(java.lang.String keyspace,
java.lang.String name)
Creates a
DescribeStatement for DESCRIBE MATERIALIZED VIEW. |
void |
withInternalDetails() |
setBindVariablesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFunctions, getPartitionKeyBindVariableIndexes, hasConditionspublic final void withInternalDetails()
public final CQLStatement prepare(ClientState clientState) throws RequestValidationException
prepare in class CQLStatement.RawRequestValidationExceptionpublic final java.util.List<ColumnSpecification> getBindVariables()
CQLStatementgetBindVariables in interface CQLStatementpublic final void authorize(ClientState state)
CQLStatementauthorize in interface CQLStatementstate - the current client statepublic final void validate(ClientState state)
CQLStatementvalidate in interface CQLStatementstate - the current client statepublic final AuditLogContext getAuditLogContext()
CQLStatementgetAuditLogContext in interface CQLStatementpublic final ResultMessage execute(QueryState state, QueryOptions options, long queryStartNanoTime) throws RequestValidationException, RequestExecutionException
CQLStatementexecute in interface CQLStatementstate - the current query stateoptions - options for this query (consistency, variables, pageSize, ...)queryStartNanoTime - the timestamp returned by System.nanoTime() when this statement was receivedRequestValidationExceptionRequestExecutionExceptionpublic ResultMessage executeLocally(QueryState state, QueryOptions options)
CQLStatementexecuteLocally in interface CQLStatementstate - the current query stateprotected abstract java.util.List<ColumnSpecification> metadata(ClientState state)
ResultMetadataprotected abstract java.util.List<java.nio.ByteBuffer> toRow(T element, boolean withInternals)
protected abstract java.util.stream.Stream<? extends T> describe(ClientState state, Keyspaces keyspaces)
public static DescribeStatement<SchemaElement> tables()
DescribeStatement for DESCRIBE TABLES.public static DescribeStatement<SchemaElement> types()
DescribeStatement for DESCRIBE TYPES.public static DescribeStatement<SchemaElement> functions()
DescribeStatement for DESCRIBE FUNCTIONS.public static DescribeStatement<SchemaElement> aggregates()
DescribeStatement for DESCRIBE AGGREGATES.public static DescribeStatement<SchemaElement> keyspaces()
DescribeStatement for DESCRIBE KEYSPACES.public static DescribeStatement<SchemaElement> schema(boolean includeSystemKeyspaces)
DescribeStatement for DESCRIBE [FULL] SCHEMA.public static DescribeStatement<SchemaElement> keyspace(java.lang.String keyspace, boolean onlyKeyspaceDefinition)
DescribeStatement for DESCRIBE KEYSPACE.public static DescribeStatement<SchemaElement> table(java.lang.String keyspace, java.lang.String name)
DescribeStatement for DESCRIBE TABLE.public static DescribeStatement<SchemaElement> index(java.lang.String keyspace, java.lang.String name)
DescribeStatement for DESCRIBE INDEX.public static DescribeStatement<SchemaElement> view(java.lang.String keyspace, java.lang.String name)
DescribeStatement for DESCRIBE MATERIALIZED VIEW.public static DescribeStatement<SchemaElement> type(java.lang.String keyspace, java.lang.String name)
DescribeStatement for DESCRIBE TYPE.public static DescribeStatement<SchemaElement> function(java.lang.String keyspace, java.lang.String name)
DescribeStatement for DESCRIBE FUNCTION.public static DescribeStatement<SchemaElement> aggregate(java.lang.String keyspace, java.lang.String name)
DescribeStatement for DESCRIBE FUNCTION.public static DescribeStatement<SchemaElement> generic(java.lang.String keyspace, java.lang.String name)
DescribeStatement for the generic DESCRIBE ....public static DescribeStatement<java.util.List<java.lang.Object>> cluster()
DescribeStatement for DESCRIBE CLUSTER.Copyright © 2009-2020 The Apache Software Foundation