org.apache.cassandra.cli

## Class CliUtils

- java.lang.Object
- - org.apache.cassandra.cli.CliUtils

    public class CliUtils
    extends java.lang.Object

### Constructor Summary

Constructors
Constructor and Description
`CliUtils()`

### Method Summary

Methods
`static java.lang.String` `escapeSQLString(java.lang.String b)`
`static java.util.Set<java.lang.String>` `getCfNamesByKeySpace(KsDef keySpace)` Returns set of column family names in specified keySpace.
`static IndexOperator` `getIndexOperator(java.lang.String operator)` Returns IndexOperator from string representation
`static KsDef` `getKeySpaceDef(java.lang.String keyspaceName, java.util.List<KsDef> keyspaces)` Parse the statement from cli and return KsDef
`static java.lang.String` `maybeEscapeName(java.lang.String name)`
`static java.lang.String` `quote(java.lang.String str)`
`static java.lang.String` `unescapeSQLString(java.lang.String b)` Strips leading and trailing "'" characters, and handles and escaped characters such as \n, \r, etc.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CliUtils

    public CliUtils()

### Method Detail

#### unescapeSQLString

    public static java.lang.String unescapeSQLString(java.lang.String b)

Strips leading and trailing "'" characters, and handles and escaped characters such as \n, \r, etc.

Parameters:
  `b` - - string to unescape
Returns:
  String - unexspaced string

#### escapeSQLString

    public static java.lang.String escapeSQLString(java.lang.String b)

#### maybeEscapeName

    public static java.lang.String maybeEscapeName(java.lang.String name)

#### getIndexOperator

    public static IndexOperator getIndexOperator(java.lang.String operator)

Returns IndexOperator from string representation

Parameters:
  `operator` - - string representing IndexOperator (=, >=, >, <, <=)
Returns:
  IndexOperator - enum value of IndexOperator or null if not found

#### getCfNamesByKeySpace

    public static java.util.Set<java.lang.String> getCfNamesByKeySpace(KsDef keySpace)

Returns set of column family names in specified keySpace.

Parameters:
  `keySpace` - - keyspace definition to get column family names from.
Returns:
  Set - column family names

#### getKeySpaceDef

    public static KsDef getKeySpaceDef(java.lang.String keyspaceName,
                       java.util.List<KsDef> keyspaces)

Parse the statement from cli and return KsDef

Parameters:
  `keyspaceName` - - name of the keyspace to lookup
  `keyspaces` - - List of known keyspaces
Returns:
  metadata about keyspace or null

#### quote

    public static java.lang.String quote(java.lang.String str)