Package org.apache.torque.adapter
Klasse DerbyAdapter
java.lang.Object
org.apache.torque.adapter.AbstractAdapter
org.apache.torque.adapter.DerbyAdapter
- Alle implementierten Schnittstellen:
Serializable
,Adapter
This is used to connect to an embedded Apache Derby Database using
the supplied JDBC driver.
- Version:
- $Id: DerbyAdapter.java 1850591 2019-01-06 19:00:34Z tv $
- Autor:
- Henning P. Schmiedehausen, tins
- Siehe auch:
-
Feldübersicht
Von Schnittstelle geerbte Felder org.apache.torque.adapter.Adapter
ADAPTER_KEY, AUTODETECT_ADAPTER, DRIVER_KEY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
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.getIDMethodSQL
(Object obj) Returns the SQL to get the database key of the last row inserted, which in this case isVALUES IDENTITY_VAL_LOCAL()
.Returns the constant from theIDMethod
interface denoting which type of primary key generation method this type of RDBMS uses.ignoreCase
(String str) This method is used to ignore case.void
lockTable
(Connection con, String table) Locks the specified table.toUpperCase
(String str) This method is used to ignore case.void
unlockTable
(Connection con, String table) Unlocks the specified table.boolean
Whether an escape clause in like should be used.boolean
Derby supports this feature but does not report it via JDBCVon Klasse geerbte Methoden org.apache.torque.adapter.AbstractAdapter
getStringDelimiter, getUpdateLockClause, ignoreCaseInOrderBy, setCapabilities, supportsNativeLimit, supportsNativeOffset, useIlike, useMinusForExcept
-
Konstruktordetails
-
DerbyAdapter
protected DerbyAdapter()Empty constructor.
-
-
Methodendetails
-
toUpperCase
This method is used to ignore case.- Angegeben von:
toUpperCase
in SchnittstelleAdapter
- Angegeben von:
toUpperCase
in KlasseAbstractAdapter
- Parameter:
str
- The string to transform to upper case.- Gibt zurück:
- The upper case string.
-
ignoreCase
This method is used to ignore case.- Angegeben von:
ignoreCase
in SchnittstelleAdapter
- Angegeben von:
ignoreCase
in KlasseAbstractAdapter
- Parameter:
str
- The string whose case to ignore.- Gibt zurück:
- The string in a case that can be ignored.
-
getIDMethodType
Beschreibung aus Klasse kopiert:AbstractAdapter
Returns the constant from theIDMethod
interface denoting which type of primary key generation method this type of RDBMS uses.- Angegeben von:
getIDMethodType
in SchnittstelleAdapter
- Angegeben von:
getIDMethodType
in KlasseAbstractAdapter
- Gibt zurück:
- IDMethod constant
- Siehe auch:
-
getIDMethodSQL
Returns the SQL to get the database key of the last row inserted, which in this case isVALUES IDENTITY_VAL_LOCAL()
.- Angegeben von:
getIDMethodSQL
in SchnittstelleAdapter
- Angegeben von:
getIDMethodSQL
in KlasseAbstractAdapter
- Parameter:
obj
- Information used for key generation.- Gibt zurück:
- The most recently inserted database key.
- Siehe auch:
-
lockTable
Locks the specified table.- Angegeben von:
lockTable
in SchnittstelleAdapter
- Angegeben von:
lockTable
in KlasseAbstractAdapter
- Parameter:
con
- The JDBC connection to use.table
- The name of the table to lock.- Löst aus:
SQLException
- No Statement could be created or executed.
-
unlockTable
Unlocks the specified table.- Angegeben von:
unlockTable
in SchnittstelleAdapter
- Angegeben von:
unlockTable
in KlasseAbstractAdapter
- Parameter:
con
- The JDBC connection to use.table
- The name of the table to unlock.- Löst aus:
SQLException
- No Statement could be created or executed.
-
escapeText
public boolean escapeText()Whether backslashes (\) should be escaped in explicit SQL strings. If true is returned, a BACKSLASH will be changed to "\\". If false is returned, a BACKSLASH will be left as "\". As derby does not need escaping of Backslashes, this method always returns false.- Angegeben von:
escapeText
in SchnittstelleAdapter
- Setzt außer Kraft:
escapeText
in KlasseAbstractAdapter
- Gibt zurück:
- true if the database needs to escape backslashes in SqlExpressions.
-
useEscapeClauseForLike
public boolean useEscapeClauseForLike()Whether an escape clause in like should be used. Example : select * from AUTHOR where AUTHOR.NAME like '\_%' ESCAPE '\'; Derby needs this, so this implementation always returnstrue
.- Angegeben von:
useEscapeClauseForLike
in SchnittstelleAdapter
- Setzt außer Kraft:
useEscapeClauseForLike
in KlasseAbstractAdapter
- Gibt zurück:
- whether the escape clause should be appended or not.
-
useGetGeneratedKeys
public boolean useGetGeneratedKeys()Derby supports this feature but does not report it via JDBC- Angegeben von:
useGetGeneratedKeys
in SchnittstelleAdapter
- Setzt außer Kraft:
useGetGeneratedKeys
in KlasseAbstractAdapter
- Gibt zurück:
- a
boolean
value - Siehe auch:
-
generateLimits
Build Derby-style query with limit or offset. The resulting query may look like this:select * from TABLENAME fetch next 3 rows only; select * from TABLENAME offset 3 rows fetch next 3 rows only;
- Angegeben von:
generateLimits
in SchnittstelleAdapter
- Setzt außer Kraft:
generateLimits
in KlasseAbstractAdapter
- Parameter:
query
- The query to modify.offset
- the offset value.limit
- the limit value.
-