public class DBDatabaseDriverOracle extends DBDatabaseDriver
| Modifier and Type | Class and Description |
|---|---|
static class |
DBDatabaseDriverOracle.BooleanType |
DBDatabaseDriver.DBSeqTable, DBDatabaseDriver.DBSetGenKeysddlColumnDefaults, GENERAL_SQL_KEYWORDS, ILLEGAL_NAME_CHARS, reservedSQLKeywords, SQL_BOOLEAN_FALSE, SQL_BOOLEAN_TRUE, SQL_CONCAT_EXPR, SQL_CURRENT_DATE, SQL_CURRENT_DATETIME, SQL_DATABASE_LINK, SQL_DATE_PATTERN, SQL_DATE_TEMPLATE, SQL_DATETIME_PATTERN, SQL_DATETIME_TEMPLATE, SQL_FUNC_ABS, SQL_FUNC_AVG, SQL_FUNC_CEILING, SQL_FUNC_COALESCE, SQL_FUNC_DAY, SQL_FUNC_DECODE, SQL_FUNC_DECODE_ELSE, SQL_FUNC_DECODE_PART, SQL_FUNC_DECODE_SEP, SQL_FUNC_ESCAPE, SQL_FUNC_FLOOR, SQL_FUNC_LENGTH, SQL_FUNC_LOWER, SQL_FUNC_LTRIM, SQL_FUNC_MAX, SQL_FUNC_MIN, SQL_FUNC_MONTH, SQL_FUNC_REPLACE, SQL_FUNC_REVERSE, SQL_FUNC_ROUND, SQL_FUNC_RTRIM, SQL_FUNC_STRINDEX, SQL_FUNC_STRINDEXFROM, SQL_FUNC_SUBSTRING, SQL_FUNC_SUBSTRINGEX, SQL_FUNC_SUM, SQL_FUNC_TRIM, SQL_FUNC_TRUNC, SQL_FUNC_UPPER, SQL_FUNC_YEAR, SQL_NULL_VALUE, SQL_PARAMETER, SQL_QUOTES_CLOSE, SQL_QUOTES_OPEN, SQL_RENAME_COLUMN, SQL_RENAME_TABLE| Constructor and Description |
|---|
DBDatabaseDriverOracle()
Constructor for the Oracle database driver.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEnableRelationStmt(DBRelation r,
boolean enable,
DBSQLScript script)
Appends a statement to enable or disable a foreign key relation.
The default is to drop or create the relation Override this method to provide different behavior for your database. |
void |
checkDatabase(DBDatabase db,
String owner,
Connection conn)
Checks whether the database definition matches the real database structure.
|
DBCommand |
createCommand(DBDatabase db)
Creates a new Oracle command object.
|
String |
extractErrorMessage(SQLException sqle)
Extracts native error message of an sqlExeption.
|
DBDatabaseDriverOracle.BooleanType |
getBooleanType() |
String |
getConvertPhrase(DataType destType,
DataType srcType,
Object format)
Returns a data type convertion phrase template for this driver
The returned template must contain a '?' which will be replaced by a column expression. |
void |
getDDLScript(DBCmdType type,
DBObject dbo,
DBSQLScript script)
Appends the required DLL commands to create, drop or alter an object to the supplied DBDQLScript.
|
Object |
getNextSequenceValue(DBDatabase db,
String seqName,
int minValue,
Connection conn)
Returns the next value of a named sequence The numbers are used for fields of type DBExpr.DT_AUTOINC.
If a driver supports this function it must return true for isSupported(DBDriverFeature.SEQUENCES). |
Object |
getResultValue(ResultSet rset,
int columnIndex,
DataType dataType)
Gets the value of a sql ResultSet.
|
String |
getSQLPhrase(int phrase)
Gets an sql phrase template for this database system.
|
Timestamp |
getUpdateTimestamp(Connection conn)
Overridden.
|
boolean |
isOracle8Compatibilty() |
boolean |
isSupported(DBDriverFeature type)
Returns whether or not a particular feature is supported by this driver
|
void |
setBooleanType(DBDatabaseDriverOracle.BooleanType booleanType) |
void |
setOracle8Compatibilty(boolean oracle8Compatibilty) |
addStatementParam, appendElementName, appendElementName, appendSQLTextValue, attachDatabase, close, createCombinedCommand, detachDatabase, detectQuoteName, executeBatch, executeQuery, executeSQL, getColumnAutoValue, getSQLDateTimeString, getSQLNumberString, getSQLTextString, getValueString, isDDLColumnDefaults, prepareStatement, setDDLColumnDefaults, stringToBooleanpublic DBDatabaseDriverOracle()
public boolean isOracle8Compatibilty()
public void setOracle8Compatibilty(boolean oracle8Compatibilty)
public DBDatabaseDriverOracle.BooleanType getBooleanType()
public void setBooleanType(DBDatabaseDriverOracle.BooleanType booleanType)
public boolean isSupported(DBDriverFeature type)
isSupported in class DBDatabaseDrivertype - type of requested feature. @see DBDriverFeaturepublic DBCommand createCommand(DBDatabase db)
createCommand in class DBDatabaseDriverdb - the database for which to create a command object forpublic String getSQLPhrase(int phrase)
getSQLPhrase in class DBDatabaseDriverphrase - the identifier of the phraseDBDatabaseDriver.getSQLPhrase(int)public String getConvertPhrase(DataType destType, DataType srcType, Object format)
DBDatabaseDrivergetConvertPhrase in class DBDatabaseDriverdestType - the target data typesrcType - the source data typeformat - additional formatting information (optional)DBDatabaseDriver.getConvertPhrase(DataType, DataType, Object)public String extractErrorMessage(SQLException sqle)
extractErrorMessage in class DBDatabaseDriversqle - the SQLExceptionpublic Object getResultValue(ResultSet rset, int columnIndex, DataType dataType) throws SQLException
getResultValue in class DBDatabaseDriverrset - the sql Resultset with the current data rowcolumnIndex - one based column Index of the desired columndataType - the desired data typeSQLException - if a database access error occurspublic Object getNextSequenceValue(DBDatabase db, String seqName, int minValue, Connection conn)
DBDatabaseDrivergetNextSequenceValue in class DBDatabaseDriverdb - the databaseseqName - the name of the sequenceminValue - the minimum value of the sequenceconn - a valid database connectionDBDatabaseDriver.getNextSequenceValue(DBDatabase, String, int, Connection)public Timestamp getUpdateTimestamp(Connection conn)
getUpdateTimestamp in class DBDatabaseDriverconn - the connection that might be usedpublic void getDDLScript(DBCmdType type, DBObject dbo, DBSQLScript script)
DBDatabaseDrivergetDDLScript in class DBDatabaseDrivertype - operation to perform (CREATE, DROP, ALTER)dbo - the object for which to perform the operation (DBDatabase, DBTable, DBView, DBColumn, DBRelation)script - the script to which to add the DDL command(s)DBDatabaseDriver.getDDLScript(DBCmdType, DBObject, DBSQLScript)public void addEnableRelationStmt(DBRelation r, boolean enable, DBSQLScript script)
DBDatabaseDriveraddEnableRelationStmt in class DBDatabaseDriverr - the foreign key relation which should be enabled or disabledenable - true to enable the relation or false to disablescript - the script to which to add the DDL command(s)DBDatabaseDriver.addEnableRelationStmt(DBRelation, boolean, DBSQLScript)public void checkDatabase(DBDatabase db, String owner, Connection conn)
checkDatabase in class DBDatabaseDriverdb - the databaseowner - the ownerconn - the connectionCopyright © 2008–2015 Apache Software Foundation. All rights reserved.