public class OraProxyUtils
extends java.lang.Object
| Constructor and Description |
|---|
OraProxyUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getVersion()
Returns full version string of orajdbc-proxy
|
static int |
getVersionMajor()
Returns version major, i.e.
|
static int |
getVersionMinor()
Returns version minor, i.e.
|
static java.math.BigInteger |
hash_value(java.lang.String sqlText)
Returns Oracle hash_value of a SQL statement, the same as PL/SQL call in RDBMS 12c+
SELECT DBMS_SQL_TRANSLATOR.SQL_HASH('select ''Test'' from dual') FROM DUAL;
Based on Computing Oracle SQL_ID and HASH_VALUE
|
static void |
readSimpleYaml(java.io.BufferedReader reader,
java.util.Map<java.lang.String,java.lang.String> mappingData) |
static java.lang.String |
sql_id(java.lang.String sqlText)
Returns Oracle sql_id of a SQL statement, the same as PL/SQL call in RDBMS 12c+
SELECT DBMS_SQL_TRANSLATOR.SQL_ID('select ''Test'' from dual') FROM DUAL;
Based on Function to compute SQL_ID out of SQL_TEXT and Computing Oracle SQL_ID and HASH_VALUE
|
static void |
write2Yaml(java.io.Writer writer,
java.lang.String sqlId,
java.lang.String sqlStatement)
Writes SQL mapping information to file
|
public static java.lang.String getVersion()
public static int getVersionMajor()
public static int getVersionMinor()
public static void write2Yaml(java.io.Writer writer,
java.lang.String sqlId,
java.lang.String sqlStatement)
throws java.io.IOException
writer - destinationsqlId - 13 character Oracle SQL_ID of SQL statementsqlStatement - SQL statement textjava.io.IOExceptionpublic static void readSimpleYaml(java.io.BufferedReader reader,
java.util.Map<java.lang.String,java.lang.String> mappingData)
throws java.io.IOException
reader - java.io.BufferedReader pointing to source YAMLmappingData - java.util.Map to store mapping datajava.io.IOExceptionpublic static java.lang.String sql_id(java.lang.String sqlText)
throws java.sql.SQLException
sqlText - SQL statement textjava.sql.SQLExceptionpublic static java.math.BigInteger hash_value(java.lang.String sqlText)
throws java.sql.SQLException
sqlText - SQL statement textjava.sql.SQLException