public class OracleAdapter extends AbstractAdapter
ADAPTER_KEY, AUTODETECT_ADAPTER, DRIVER_KEY| Modifier | Constructor and Description |
|---|---|
protected |
OracleAdapter()
Empty constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
escapeText()
This method is for the SqlExpression.quoteAndEscape rules.
|
void |
generateLimits(Query query,
long offset,
int limit)
Build Oracle-style query with limit or offset.
|
String |
getIDMethodSQL(Object sequenceName)
Returns SQL used to get the most recently inserted primary key.
|
IDMethod |
getIDMethodType()
Returns the constant from the
IDMethod interface denoting which
type of primary key generation method this type of RDBMS uses. |
String |
ignoreCase(String in)
This method is used to ignore case.
|
void |
lockTable(Connection con,
String table)
Locks the specified table.
|
String |
toUpperCase(String in)
This method is used to ignore case.
|
void |
unlockTable(Connection con,
String table)
Unlocks the specified table.
|
boolean |
useEscapeClauseForLike()
Whether an escape clause in like should be used.
|
boolean |
useMinusForExcept()
Whether to use the MINUS operator instead of the EXCEPT operator.
|
getStringDelimiter, getUpdateLockClause, ignoreCaseInOrderBy, setCapabilities, supportsNativeLimit, supportsNativeOffset, useGetGeneratedKeys, useIlikepublic String toUpperCase(String in)
toUpperCase in interface AdaptertoUpperCase in class AbstractAdapterin - The string to transform to upper case.public String ignoreCase(String in)
ignoreCase in interface AdapterignoreCase in class AbstractAdapterin - The string whose case to ignore.public IDMethod getIDMethodType()
AbstractAdapterIDMethod interface denoting which
type of primary key generation method this type of RDBMS uses.getIDMethodType in interface AdaptergetIDMethodType in class AbstractAdapterAdapter.getIDMethodType()public String getIDMethodSQL(Object sequenceName)
AbstractAdapternull.getIDMethodSQL in interface AdaptergetIDMethodSQL in class AbstractAdaptersequenceName - The name of the sequence (should be of type String).Returns the next key from a sequence. Uses the following
implementation:
select sequenceName.nextval from dual
,
Adapter.getIDMethodSQL(Object)public void lockTable(Connection con, String table) throws SQLException
lockTable in interface AdapterlockTable in class AbstractAdaptercon - The JDBC connection to use.table - The name of the table to lock.SQLException - No Statement could be created or executed.public void unlockTable(Connection con, String table) throws SQLException
unlockTable in interface AdapterunlockTable in class AbstractAdaptercon - The JDBC connection to use.table - The name of the table to unlock.SQLException - No Statement could be created or executed.public void generateLimits(Query query, long offset, int limit)
SELECT B.* FROM (
SELECT A.*, rownum as TORQUE$ROWNUM FROM (
query
) A
) B WHERE B.TORQUE$ROWNUM > offset AND B.TORQUE$ROWNUM
<= offset + limit
generateLimits in interface AdaptergenerateLimits in class AbstractAdapterquery - The query to modifyoffset - the offset Valuelimit - the limit Valuepublic boolean escapeText()
escapeText in interface AdapterescapeText in class AbstractAdapterpublic boolean useEscapeClauseForLike()
true.useEscapeClauseForLike in interface AdapteruseEscapeClauseForLike in class AbstractAdapterpublic boolean useMinusForExcept()
true.useMinusForExcept in interface AdapteruseMinusForExcept in class AbstractAdapterCopyright © 2000–2020 The Apache Software Foundation. All rights reserved.