Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Metadata

        public Metadata()
    • 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 even Cluster#connect(String).