public class DerbyAdapter extends AbstractAdapter
ADAPTER_KEY, AUTODETECT_ADAPTER, DRIVER_KEY| Modifier | Constructor and Description |
|---|---|
protected |
DerbyAdapter()
Empty constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
escapeText()
Whether backslashes (\) should be escaped in explicit SQL strings.
|
void |
generateLimits(Query query,
long offset,
int limit)
Build Derby-style query with limit or offset.
|
String |
getIDMethodSQL(Object obj)
Returns the SQL to get the database key of the last row
inserted, which in this case is
VALUES IDENTITY_VAL_LOCAL(). |
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 str)
This method is used to ignore case.
|
void |
lockTable(Connection con,
String table)
Locks the specified table.
|
String |
toUpperCase(String str)
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 |
useGetGeneratedKeys()
Derby supports this feature but does not report it via JDBC
|
getStringDelimiter, getUpdateLockClause, ignoreCaseInOrderBy, setCapabilities, supportsNativeLimit, supportsNativeOffset, useIlike, useMinusForExceptpublic String toUpperCase(String str)
toUpperCase in interface AdaptertoUpperCase in class AbstractAdapterstr - The string to transform to upper case.public String ignoreCase(String str)
ignoreCase in interface AdapterignoreCase in class AbstractAdapterstr - 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 obj)
VALUES IDENTITY_VAL_LOCAL().getIDMethodSQL in interface AdaptergetIDMethodSQL in class AbstractAdapterobj - Information used for key generation.Adapter.getIDMethodSQL(Object obj)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 boolean escapeText()
escapeText in interface AdapterescapeText in class AbstractAdapterpublic boolean useEscapeClauseForLike()
true.useEscapeClauseForLike in interface AdapteruseEscapeClauseForLike in class AbstractAdapterpublic boolean useGetGeneratedKeys()
useGetGeneratedKeys in interface AdapteruseGetGeneratedKeys in class AbstractAdapterboolean valueAbstractAdapter.useGetGeneratedKeys()public void generateLimits(Query query, long offset, int limit)
select * from TABLENAME fetch next 3 rows only; select * from TABLENAME offset 3 rows fetch next 3 rows only;
generateLimits in interface AdaptergenerateLimits in class AbstractAdapterquery - The query to modify.offset - the offset value.limit - the limit value.Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.