|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.orindasoft.pub.SqlUtils
A set of useful static methods for working with SQL.
This class changes for different versions of Oracle.
(c) Copyright 2003 - 2011 Orinda Software Ltd
| Field Summary | |
static int |
DDL
Constant for identifying statements as being DDL statements |
static int |
DELETE
Constant for identifying statements as being deletes |
static int |
FAILED_TO_CONVERT_INTERNAL
Constant for ORA-17059 message - invalid name pattern The most common cause for this is a DB/Driver version mismatch |
static int |
INSERT
Constant for identifying statements as being inserts |
static int |
INVALID_NAME_PATTERN
Constant for ORA-17074 message - invalid name pattern |
static int |
LOCK
Constant for identifying statements as being Lock statements |
static int |
MERGE
Constant for identifying statements as being Merge statements |
static int |
OBJECT_DOES_NOT_EXIST
Constant for ORA-4043 - Object does not exist |
static int |
ORACLE_BFILE_DATATYPE
Constant for identifying oracle BFILE datatypes |
static int |
ORACLE_BINARY_DATATYPE
Constant for identifying oracle Binary datatypes |
static int |
ORACLE_BLOB_DATATYPE
Constant for identifying oracle BLOB datatypes |
static int |
ORACLE_BOOLEAN_DATATYPE
Constant for identifying PL/SQL Boolean |
static int |
ORACLE_CLOB_DATATYPE
Constant for identifying oracle CLOB datatypes |
static int |
ORACLE_DATE_DATATYPE
Constant for identifying oracle Date datatypes |
static int |
ORACLE_INTERVAL_DAY_TO_SECOND_DATATYPE
Constant for identifying INTERVAL DAY TO SECOND Datatype |
static int |
ORACLE_INTERVAL_YEAR_TO_MONTH_DATATYPE
Constant for identifying INTERVAL YEAR TO MONTH Datatype |
static int |
ORACLE_LONG_BINARY_DATATYPE
Constant for identifying oracle Long Binary datatypes |
static int |
ORACLE_LONGTEXT_DATATYPE
Constant for identifying oracle Long Text datatypes |
static int |
ORACLE_NULL_DATATYPE
Constant for identifying null datatypes |
static int |
ORACLE_NUMBER_DATATYPE
Constant for identifying oracle Number datatypes |
static int |
ORACLE_OBJECT_DATATYPE
Constant for identifying Oracle OBJECT Datatype |
static int |
ORACLE_OTHER_DATATYPE
Constant for identifying unrecognized oracle datatypes |
static int |
ORACLE_PLSQL_INDEXBY_DATATYPE
Constant for identifying PL/SQL Index By tables |
static int |
ORACLE_PLSQL_INDEXBY_ROWTYPE_DATATYPE
Constant for identifying PL/SQL Index By tables |
static int |
ORACLE_REFCURSOR_DATATYPE
Constant for identifying oracle ref cursors |
static int |
ORACLE_ROWID_DATATYPE
Constant for identifying ROWID |
static int |
ORACLE_ROWTYPE_DATATYPE
Constant for identifying PL/SQL Rowtype Datatype |
static int |
ORACLE_SDO_GEOMETRY_DATATYPE
Constant for identifying ORACLE_SDO_GEOMETRY_DATATYPE |
static int |
ORACLE_TABLE_DATATYPE
Constant for identifying oracle Collection's TABLE |
static int |
ORACLE_TEXT_DATATYPE
Constant for identifying oracle Text datatypes |
static int |
ORACLE_TIMESTAMP_DATATYPE
Constant for identifying TIMESTAMP |
static int |
ORACLE_TIMESTAMPLTZ_DATATYPE
Constant for identifying TIMESTAMPLTZ |
static int |
ORACLE_TIMESTAMPTZ_DATATYPE
Constant for identifying TIMESTAMPTZ |
static int |
ORACLE_UROWID_DATATYPE
Constant for identifying UROWID |
static int |
ORACLE_VARRAY_DATATYPE
Constant for identifying oracle Collection's VARRAY |
static int |
ORACLE_XMLTYPE_DATATYPE
Constant for identifying XMLType |
static int |
ORINDASOFT_READONLYROWSET
Constant for identifying PL/SQL Boolean |
static int |
PLSQL
Constant for identifying statements as being PL/SQL statements |
static java.lang.String[] |
RESERVED_WORDS
Array containing words which are not legal identifers... |
static int |
SAVEPOINT
Constant for identifying statements as being Lock statements |
static int |
SELECT
Constant for identifying statements as being queries |
static int |
SET_CONSTRAINTS
Constant for identifying statements as being Lock statements |
static int |
SET_ROLE
Constant for identifying statements as being Lock statements |
static int |
SET_TRANSACTION
Constant for identifying statements as being Lock statements |
static int |
TYPE_HAS_DEPENDENTS
Constant for ORA-2303 message - cannot drop or replace a type with type or table dependents |
static int |
UNKNOWN
Constant for identifying statements as being unidentifiable |
static int |
UPDATE
Constant for identifying statements as being updates |
static int |
XPLAN
Constant for identifying statements as being Lock statements |
| Constructor Summary | |
SqlUtils()
A set of useful static methods for working with SQL. |
|
| Method Summary | |
static int |
countParameters(java.lang.String aSqlStatement)
Count parameters in a SQL Statement This method has a known bug |
static oracle.sql.BFILE |
createBfileLocator(java.lang.String theOracleDirectory,
java.lang.String theFileName,
java.sql.Connection theConnection,
LogInterface theLog,
boolean debugMessages)
Create and return a BFILE locator. |
static int |
getStatementType(java.lang.String theStatement)
Classify a SQL statement as a SELECT, INSERT, UPDATE, etc. |
static int |
getUnderlyingOracleDatatype(java.lang.String theColumnDataType)
Return an int that represents the underlying oracle data type. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int SELECT
public static final int INSERT
public static final int UPDATE
public static final int DELETE
public static final int DDL
public static final int LOCK
public static final int MERGE
public static final int XPLAN
public static final int SAVEPOINT
public static final int SET_CONSTRAINTS
public static final int SET_TRANSACTION
public static final int SET_ROLE
public static final int PLSQL
public static final int UNKNOWN
public static final java.lang.String[] RESERVED_WORDS
public static final int ORACLE_TEXT_DATATYPE
public static final int ORACLE_NUMBER_DATATYPE
public static final int ORACLE_DATE_DATATYPE
public static final int ORACLE_LONGTEXT_DATATYPE
public static final int ORACLE_LONG_BINARY_DATATYPE
public static final int ORACLE_BINARY_DATATYPE
public static final int ORACLE_CLOB_DATATYPE
public static final int ORACLE_BLOB_DATATYPE
public static final int ORACLE_BFILE_DATATYPE
public static final int ORACLE_REFCURSOR_DATATYPE
public static final int ORACLE_BOOLEAN_DATATYPE
public static final int ORINDASOFT_READONLYROWSET
public static final int ORACLE_ROWID_DATATYPE
public static final int ORACLE_UROWID_DATATYPE
public static final int ORACLE_TIMESTAMP_DATATYPE
public static final int ORACLE_TIMESTAMPTZ_DATATYPE
public static final int ORACLE_TIMESTAMPLTZ_DATATYPE
public static final int ORACLE_TABLE_DATATYPE
public static final int ORACLE_VARRAY_DATATYPE
public static final int ORACLE_OBJECT_DATATYPE
public static final int ORACLE_ROWTYPE_DATATYPE
public static final int ORACLE_INTERVAL_YEAR_TO_MONTH_DATATYPE
public static final int ORACLE_INTERVAL_DAY_TO_SECOND_DATATYPE
public static final int ORACLE_PLSQL_INDEXBY_DATATYPE
public static final int ORACLE_PLSQL_INDEXBY_ROWTYPE_DATATYPE
public static final int ORACLE_XMLTYPE_DATATYPE
public static final int ORACLE_SDO_GEOMETRY_DATATYPE
public static final int ORACLE_OTHER_DATATYPE
public static final int ORACLE_NULL_DATATYPE
public static final int OBJECT_DOES_NOT_EXIST
public static final int INVALID_NAME_PATTERN
public static final int FAILED_TO_CONVERT_INTERNAL
public static final int TYPE_HAS_DEPENDENTS
| Constructor Detail |
public SqlUtils()
| Method Detail |
public static int getStatementType(java.lang.String theStatement)
This method has a known bug
theStatement - a SQL Statementpublic static int countParameters(java.lang.String aSqlStatement)
String - aSqlStatement a SQL Statementpublic static int getUnderlyingOracleDatatype(java.lang.String theColumnDataType)
String - An oracle data type
public static oracle.sql.BFILE createBfileLocator(java.lang.String theOracleDirectory,
java.lang.String theFileName,
java.sql.Connection theConnection,
LogInterface theLog,
boolean debugMessages)
throws CSException
String - theOracleDirectoryString - theFileNameConnection - a database Connectioncom.orindasoft.pub.LogInterface - a logging mechanismboolean - debugMessages Create debug messages in log
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||