Package com.alibaba.druid.util
Class OracleUtils
- java.lang.Object
-
- com.alibaba.druid.util.OracleUtils
-
public class OracleUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description OracleUtils()
-
Method Summary
-
-
-
Method Detail
-
OracleXAConnection
public static XAConnection OracleXAConnection(Connection oracleConnection) throws XAException
- Throws:
XAException
-
getRowPrefetch
public static int getRowPrefetch(PreparedStatement stmt) throws SQLException
- Throws:
SQLException
-
setRowPrefetch
public static void setRowPrefetch(PreparedStatement stmt, int value) throws SQLException
- Throws:
SQLException
-
enterImplicitCache
public static void enterImplicitCache(PreparedStatement stmt) throws SQLException
- Throws:
SQLException
-
exitImplicitCacheToClose
public static void exitImplicitCacheToClose(PreparedStatement stmt) throws SQLException
- Throws:
SQLException
-
exitImplicitCacheToActive
public static void exitImplicitCacheToActive(PreparedStatement stmt) throws SQLException
- Throws:
SQLException
-
unwrapInternal
public static oracle.jdbc.internal.OraclePreparedStatement unwrapInternal(PreparedStatement stmt) throws SQLException
- Throws:
SQLException
-
getVersionNumber
public static short getVersionNumber(DruidPooledConnection conn) throws SQLException
- Throws:
SQLException
-
setDefaultRowPrefetch
public static void setDefaultRowPrefetch(Connection conn, int value) throws SQLException
- Throws:
SQLException
-
getDefaultRowPrefetch
public static int getDefaultRowPrefetch(Connection conn, int value) throws SQLException
- Throws:
SQLException
-
getImplicitCachingEnabled
public static boolean getImplicitCachingEnabled(Connection conn) throws SQLException
- Throws:
SQLException
-
getStatementCacheSize
public static int getStatementCacheSize(Connection conn) throws SQLException
- Throws:
SQLException
-
purgeImplicitCache
public static void purgeImplicitCache(Connection conn) throws SQLException
- Throws:
SQLException
-
setImplicitCachingEnabled
public static void setImplicitCachingEnabled(Connection conn, boolean cache) throws SQLException
- Throws:
SQLException
-
setStatementCacheSize
public static void setStatementCacheSize(Connection conn, int size) throws SQLException
- Throws:
SQLException
-
pingDatabase
public static int pingDatabase(Connection conn) throws SQLException
- Throws:
SQLException
-
openProxySession
public static void openProxySession(Connection conn, int type, Properties prop) throws SQLException
- Throws:
SQLException
-
getDefaultExecuteBatch
public static int getDefaultExecuteBatch(Connection conn) throws SQLException
- Throws:
SQLException
-
unwrap
public static oracle.jdbc.OracleConnection unwrap(Connection conn) throws SQLException
- Throws:
SQLException
-
getROWID
public static oracle.sql.ROWID getROWID(ResultSet rs, int columnIndex) throws SQLException
- Throws:
SQLException
-
isBuiltinFunction
public static boolean isBuiltinFunction(String function)
-
isBuiltinTable
public static boolean isBuiltinTable(String table)
-
isKeyword
public static boolean isKeyword(String name)
-
showTables
public static List<String> showTables(Connection conn) throws SQLException
- Throws:
SQLException
-
getTableDDL
public static List<String> getTableDDL(Connection conn, String... tables) throws SQLException
- Throws:
SQLException
-
getTableDDL
public static List<String> getTableDDL(Connection conn, List<String> tables) throws SQLException
- Throws:
SQLException
-
getCreateTableScript
public static String getCreateTableScript(Connection conn) throws SQLException
- Throws:
SQLException
-
getCreateTableScript
public static String getCreateTableScript(Connection conn, boolean sorted, boolean simplify) throws SQLException
- Throws:
SQLException
-
-