java.lang.Object
org.apache.cassandra.cql3.functions.types.Metadata

public class Metadata extends Object
Keeps metadata on the connected cluster, including known nodes and schema definitions.
  • Constructor Details

    • Metadata

      public Metadata()
  • Method Details

    • quote

      public static String quote(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).