Package com.databricks.jdbc.common.util

## Class StringUtil

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

    public class StringUtil
    extends Object

### Constructor Summary

Constructors
`StringUtil()`

### Method Summary

All Methods Static Methods Concrete Methods
`static String` `convertJdbcEscapeSequences​(String sql)`
`static String` `escapeStringLiteral​(String str)` Escape sql string literal which is enclosed in a single quote, it replaces single quote with doubled single quotes.

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

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

### Constructor Detail

#### StringUtil

    public StringUtil()

### Method Detail

#### 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