Class Metadata
- java.lang.Object
-
- org.apache.cassandra.cql3.functions.types.Metadata
-
public class Metadata extends java.lang.Object
Keeps metadata on the connected cluster, including known nodes and schema definitions.
-
-
Constructor Summary
Constructors Constructor Description Metadata()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
quote(java.lang.String id)
Quote a keyspace, table or column identifier to make it case sensitive.
-
-
-
Method Detail
-
quote
public static java.lang.String quote(java.lang.String id)
Quote a keyspace, table or column identifier to make it case sensitive.CQL identifiers, including keyspace, table and column ones, are case insensitive by default. Case sensitive identifiers can however be provided by enclosing the identifier in double quotes (see the CQL documentation for details). If you are using case sensitive identifiers, this method can be used to enclose such identifiers in double quotes, making them case sensitive.
Note that reserved CQL keywords should also be quoted. You can check if a given identifier is a reserved keyword by calling
#isReservedCqlKeyword(String)
.- Parameters:
id
- the keyspace or table identifier.- Returns:
id
enclosed in double-quotes, for use in methods like#getReplicas
,#getKeyspace
,KeyspaceMetadata#getTable
or evenCluster#connect(String)
.
-
-