Class StringUtil

java.lang.Object
com.databricks.jdbc.common.util.StringUtil

public class StringUtil extends Object
  • Constructor Details

    • StringUtil

      public StringUtil()
  • Method Details

    • convertJdbcEscapeSequences

      public static String convertJdbcEscapeSequences(String sql)
    • escapeStringLiteral

      public static String escapeStringLiteral(String str)
      Escape sql string literal which is enclosed in a single quote, it replaces single quote with doubled single quotes.

      Please always use prepareStatement to bind variables if possible, only use it when prepareStatement is not applicable, e.g. some DDL statement

    • checkPrefixMatch

      public static boolean checkPrefixMatch(String prefix, String fileName, boolean caseSensitive)
      Function to check if the given prefix exists in the fileName
    • split

      public static List<String> split(String value)
    • getFolderNameFromPath

      public static String getFolderNameFromPath(String path)
      Function to return the folder name from the path
    • getBaseNameFromPath

      public static String getBaseNameFromPath(String path)
      Function to return the base name from the path
    • getVolumePath

      public static String getVolumePath(String catalog, String schema, String volume)
      Building the volume path using the provided catalog, schema and volume