com.dolphindb.jdbc

## Class Utils

- java.lang.Object
- - com.dolphindb.jdbc.Utils

    public class Utils
    extends Object

### Field Summary

Fields
`static Pattern` `ASSIGN_PATTERN`
`static Pattern` `DELETE_LOADTABLE_PATTERN`
`static Pattern` `DELETE_PATTERN`
`static int` `DML_DELETE`
`static int` `DML_EXEC`
`static int` `DML_INSERT`
`static int` `DML_OTHER`
`static int` `DML_SELECT`
`static int` `DML_UPDATE`
`static Set<String>` `sqlWareHouse`
`static Pattern` `UPDATE_PATTERN`

### Constructor Summary

Constructors
Constructor and Description
`Utils()`

### Method Summary

All Methods Static Methods Concrete Methods
`static String` `changeCase(String sql)`
`static String` `changeCase(String sql, JDBCConnection connection)`
`static void` `checkInsertSQLValid(String sql, int columnSize)`
`static boolean` `checkServerVersionIfSupportCatalog(JDBCConnection connection)`
`static boolean` `checkServerVersionIfSupportCatalog(String version)`
`static boolean` `checkServerVersionIfSupportRowCount(JDBCConnection connection)`
`static boolean` `checkServerVersionIfSupportRowCount(String version)`
`static boolean` `checkServerVersionIfSupportRunSql(JDBCConnection connection)`
`static boolean` `checkServerVersionIfSupportRunSql(String version)`
`static Object` `convertEntityToJavaObject(com.xxdb.data.Entity entity, com.xxdb.data.Entity.DATA_TYPE dataType)`
`static com.xxdb.data.Entity` `convertJavaObjectToEntity(Object value)`
`static Object` `convertVectorToJavaObjectArray(com.xxdb.data.Vector vector)`
`static Object` `convertVectorToJavaObjectArray(com.xxdb.data.Vector vector, int startIndex, int endIndex)`
`static com.xxdb.data.Scalar` `createScalar(com.xxdb.data.Entity.DATA_TYPE dataType, String value, int extraParam)`
`static com.xxdb.data.Vector` `createStringVector(com.xxdb.data.Entity.DATA_TYPE dataType, String[] values, int extraParam)`
`static String` `dbVectorString(String s)`
`static int` `getDml(String sql)`
`static Map<String,Integer>` `getInsertColumnParamInSql(String sql)`
`static String` `getInsertColumnString(String sql)`
`static String` `getInsertValueQuestionString(String sql)`
`static String[]` `getProperties(Properties prop, String[] keys)`
`static String` `getRandomString(int length)`
`static String` `getSelectOneColName(String sql)`
`static String` `getTableName(String sql, boolean isPrepareStatement)`
`static boolean` `isEmpty(CharSequence cs)`
`static boolean` `isNotEmpty(CharSequence cs)`
`static boolean` `isUpdateable(String s)`
`static Object` `java2db(Object o)`
`static void` `joinOrder(StringBuilder sb, String[] values, String join)`
`static String` `oracleToDolphin(String sql)`
`static String` `outerJoinToFullJoin(String sql)`
`static List<String>` `parseMvccPath(String str)`
`static String` `parseOtherPath(String str, Set<String> aliasSet)`
`static void` `parseProperties(String s, Properties prop, String split1, String split2)`
`static String` `parseTableAliasPropToScript(String tableAliasValue)`
`static int` `transferColDefsTypesToSqlTypes(String type)`
`static com.xxdb.data.BasicTable` `Vevtor2Table(com.xxdb.data.Vector vector, String sql)`

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

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

### Field Detail

#### DML_OTHER

    public static final int DML_OTHER

See Also:
  Constant Field Values

#### DML_SELECT

    public static final int DML_SELECT

See Also:
  Constant Field Values

#### DML_INSERT

    public static final int DML_INSERT

See Also:
  Constant Field Values

#### DML_UPDATE

    public static final int DML_UPDATE

See Also:
  Constant Field Values

#### DML_DELETE

    public static final int DML_DELETE

See Also:
  Constant Field Values

#### DML_EXEC

    public static final int DML_EXEC

See Also:
  Constant Field Values

#### DELETE_PATTERN

    public static final Pattern DELETE_PATTERN

#### DELETE_LOADTABLE_PATTERN

    public static final Pattern DELETE_LOADTABLE_PATTERN

#### UPDATE_PATTERN

    public static final Pattern UPDATE_PATTERN

#### ASSIGN_PATTERN

    public static final Pattern ASSIGN_PATTERN

#### sqlWareHouse

    public static Set<String> sqlWareHouse

### Constructor Detail

#### Utils

    public Utils()

### Method Detail

#### java2db

    public static Object java2db(Object o)

#### dbVectorString

    public static String dbVectorString(String s)

#### joinOrder

    public static void joinOrder(StringBuilder sb,
                                 String[] values,
                                 String join)

#### parseProperties

    public static void parseProperties(String s,
                                       Properties prop,
                                       String split1,
                                       String split2)
                                throws SQLException

Throws:
  `SQLException`

#### getProperties

    public static String[] getProperties(Properties prop,
                                         String[] keys)

#### getDml

    public static int getDml(String sql)

#### getTableName

    public static String getTableName(String sql,
                                      boolean isPrepareStatement)
                               throws SQLException

Throws:
  `SQLException`

#### isUpdateable

    public static boolean isUpdateable(String s)

#### getRandomString

    public static String getRandomString(int length)

#### Vevtor2Table

    public static com.xxdb.data.BasicTable Vevtor2Table(com.xxdb.data.Vector vector,
                                                        String sql)

#### checkServerVersionIfSupportCatalog

    public static boolean checkServerVersionIfSupportCatalog(String version)

#### checkServerVersionIfSupportRunSql

    public static boolean checkServerVersionIfSupportRunSql(String version)

#### checkServerVersionIfSupportRowCount

    public static boolean checkServerVersionIfSupportRowCount(String version)

#### changeCase

    public static String changeCase(String sql)

#### changeCase

    public static String changeCase(String sql,
                                    JDBCConnection connection)

#### getSelectOneColName

    public static String getSelectOneColName(String sql)

#### outerJoinToFullJoin

    public static String outerJoinToFullJoin(String sql)

#### oracleToDolphin

    public static String oracleToDolphin(String sql)

#### isEmpty

    public static boolean isEmpty(CharSequence cs)

#### isNotEmpty

    public static boolean isNotEmpty(CharSequence cs)

#### parseTableAliasPropToScript

    public static String parseTableAliasPropToScript(String tableAliasValue)

#### parseOtherPath

    public static String parseOtherPath(String str,
                                        Set<String> aliasSet)

#### parseMvccPath

    public static List<String> parseMvccPath(String str)

#### getInsertColumnString

    public static String getInsertColumnString(String sql)

#### getInsertValueQuestionString

    public static String getInsertValueQuestionString(String sql)

#### getInsertColumnParamInSql

    public static Map<String,Integer> getInsertColumnParamInSql(String sql)

#### checkInsertSQLValid

    public static void checkInsertSQLValid(String sql,
                                           int columnSize)

#### transferColDefsTypesToSqlTypes

    public static int transferColDefsTypesToSqlTypes(String type)

#### checkServerVersionIfSupportCatalog

    public static boolean checkServerVersionIfSupportCatalog(JDBCConnection connection)

#### checkServerVersionIfSupportRunSql

    public static boolean checkServerVersionIfSupportRunSql(JDBCConnection connection)

#### checkServerVersionIfSupportRowCount

    public static boolean checkServerVersionIfSupportRowCount(JDBCConnection connection)

#### convertEntityToJavaObject

    public static Object convertEntityToJavaObject(com.xxdb.data.Entity entity,
                                                   com.xxdb.data.Entity.DATA_TYPE dataType)

#### convertVectorToJavaObjectArray

    public static Object convertVectorToJavaObjectArray(com.xxdb.data.Vector vector)
                                                 throws SQLException

Throws:
  `SQLException`

#### convertVectorToJavaObjectArray

    public static Object convertVectorToJavaObjectArray(com.xxdb.data.Vector vector,
                                                        int startIndex,
                                                        int endIndex)
                                                 throws SQLException

Throws:
  `SQLException`

#### convertJavaObjectToEntity

    public static com.xxdb.data.Entity convertJavaObjectToEntity(Object value)
                                                          throws Exception

Throws:
  `Exception`

#### createScalar

    public static com.xxdb.data.Scalar createScalar(com.xxdb.data.Entity.DATA_TYPE dataType,
                                                    String value,
                                                    int extraParam)

#### createStringVector

    public static com.xxdb.data.Vector createStringVector(com.xxdb.data.Entity.DATA_TYPE dataType,
                                                          String[] values,
                                                          int extraParam)
                                                   throws Exception

Throws:
  `Exception`