Class CqlStrings

java.lang.Object
io.stargate.sgv2.api.common.cql.CqlStrings

public class CqlStrings extends Object
  • Constructor Details

    • CqlStrings

      public CqlStrings()
  • Method Details

    • quote

      public static String quote(String value)
      Quote the given string; single quotes are escaped. If the given string is null, this method returns a quoted empty string ('').
    • doubleQuote

      public static String doubleQuote(String value)
      Quote the given string; double quotes are escaped. If the given string is null, this method returns a quoted empty string ("").
    • doubleQuoteUdts

      public static String doubleQuoteUdts(String dataTypeName)
      Given the text description of a CQL type, quote any UDT names inside it. For example:
      
       map<text,Address> => map<text,"Address">
       
      The input string is assumed to be in "internal" form, ie exact case and unquoted. For simplicity, UDTs will be systematically quoted, even when they are not case-sensitive.