public class MssqlAdapter extends AbstractAdapter
ADAPTER_KEY, AUTODETECT_ADAPTER, DRIVER_KEY| Modifier | Constructor and Description |
|---|---|
protected |
MssqlAdapter()
Empty constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
escapeText()
Determines whether backslashes (\) should be escaped in explicit SQL
strings.
|
void |
generateLimits(Query query,
long offset,
int limit)
Modify a query to add limit and offset values for MSSQL.
|
String |
getIDMethodSQL(Object unused)
Returns the last value from an identity column (available on a
per-session basis from the global variable
@@identity). |
IDMethod |
getIDMethodType()
Returns the constant from the
IDMethod interface denoting which
type of primary key generation method this type of RDBMS uses. |
String |
getUpdateLockClause()
Returns the clause which acquires a write lock on a row
when doing a select.
|
String |
ignoreCase(String in)
This method is used to ignore case.
|
void |
lockTable(Connection con,
String table)
Locks the specified table.
|
boolean |
supportsNativeOffset()
Returns whether the database natively supports returning results
starting at an offset position other than 0.
|
String |
toUpperCase(String in)
This method is used to ignore case.
|
void |
unlockTable(Connection con,
String table)
Tries to unlock the specified table.
|
boolean |
useEscapeClauseForLike()
Whether an escape clause in like should be used.
|
getStringDelimiter, ignoreCaseInOrderBy, setCapabilities, supportsNativeLimit, useGetGeneratedKeys, useIlike, useMinusForExceptpublic 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 unused)
@@identity).getIDMethodSQL in interface AdaptergetIDMethodSQL in class AbstractAdapterunused - Information used for key generation.Adapter.getIDMethodSQL(Object obj)public String getUpdateLockClause()
getUpdateLockClause in interface AdaptergetUpdateLockClause in class AbstractAdapterpublic 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 supportsNativeOffset()
supportsNativeOffset in interface AdaptersupportsNativeOffset in class AbstractAdapterpublic void generateLimits(Query query, long offset, int limit) throws TorqueException
generateLimits in interface AdaptergenerateLimits in class AbstractAdapterquery - The query to modifyoffset - the offset Valuelimit - the limit ValueTorqueException - if any error occurs when building the querypublic boolean escapeText()
escapeText in interface AdapterescapeText in class AbstractAdapterAdapter.escapeText()public boolean useEscapeClauseForLike()
true.useEscapeClauseForLike in interface AdapteruseEscapeClauseForLike in class AbstractAdapterCopyright © 2000–2020 The Apache Software Foundation. All rights reserved.