Package org.apache.cassandra.cql3
Interface SchemaElement
-
- All Known Implementing Classes:
JavaBasedUDFunction
,KeyspaceMetadata
,TableMetadata
,TableMetadata.CompactTableMetadata
,UDAggregate
,UDFunction
,UserFunction
,UserType
,ViewMetadata
public interface SchemaElement
A schema element (keyspace, udt, udf, uda, table, index, view).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SchemaElement.SchemaElementType
-
Field Summary
Fields Modifier and Type Field Description static java.util.Comparator<SchemaElement>
NAME_COMPARATOR
Comparator used to sortDescribable
name.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.String
elementKeyspace()
Returns the CQL name of the keyspace to which this schema element belong.default java.lang.String
elementKeyspaceQuotedIfNeeded()
java.lang.String
elementName()
Returns the CQL name of this schema element.default java.lang.String
elementNameQuotedIfNeeded()
SchemaElement.SchemaElementType
elementType()
Return the schema element typejava.lang.String
toCqlString(boolean withInternals, boolean ifNotExists)
Returns a CQL representation of this element
-
-
-
Field Detail
-
NAME_COMPARATOR
static final java.util.Comparator<SchemaElement> NAME_COMPARATOR
Comparator used to sortDescribable
name.
-
-
Method Detail
-
elementType
SchemaElement.SchemaElementType elementType()
Return the schema element type- Returns:
- the schema element type
-
elementKeyspace
java.lang.String elementKeyspace()
Returns the CQL name of the keyspace to which this schema element belong.- Returns:
- the keyspace name.
-
elementName
java.lang.String elementName()
Returns the CQL name of this schema element.- Returns:
- the name of this schema element.
-
elementNameQuotedIfNeeded
default java.lang.String elementNameQuotedIfNeeded()
-
elementKeyspaceQuotedIfNeeded
default java.lang.String elementKeyspaceQuotedIfNeeded()
-
toCqlString
java.lang.String toCqlString(boolean withInternals, boolean ifNotExists)
Returns a CQL representation of this element- Parameters:
withInternals
- if the internals part of the CQL should be exposed.ifNotExists
- if "IF NOT EXISTS" should be included.- Returns:
- a CQL representation of this element
-
-