public class MssqlAdapter
extends org.apache.torque.adapter.AbstractAdapter
| Constructor and Description |
|---|
MssqlAdapter()
Empty constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
escapeText()
Determines whether backslashes (\) should be escaped in explicit SQL strings.
|
void |
generateLimits(org.apache.torque.sql.Query query,
long offset,
int limit)
Modify a query to add limit and offset values for Sybase.
|
java.lang.String |
getIDMethodSQL(java.lang.Object unused)
Returns the last value from an identity column (available on a per-session basis from the
global variable
@@identity). |
org.apache.torque.adapter.IDMethod |
getIDMethodType() |
java.lang.String |
getUpdateLockClause()
Returns the clause which acquires a write lock on a row when doing a select.
|
java.lang.String |
ignoreCase(java.lang.String in)
This method is used to ignore case.
|
void |
lockTable(java.sql.Connection con,
java.lang.String table)
Locks the specified table.
|
boolean |
supportsNativeLimit()
Return true for Sybase
|
boolean |
supportsNativeOffset()
Return true for MS SQL Server
|
java.lang.String |
toUpperCase(java.lang.String in)
This method is used to ignore case.
|
void |
unlockTable(java.sql.Connection con,
java.lang.String table)
Tries to unlock the specified table.
|
boolean |
useEscapeClauseForLike()
Whether an escape clause in like should be used.
|
public java.lang.String toUpperCase(java.lang.String in)
toUpperCase in interface org.apache.torque.adapter.AdaptertoUpperCase in class org.apache.torque.adapter.AbstractAdapterin - The string to transform to upper case.public java.lang.String ignoreCase(java.lang.String in)
ignoreCase in interface org.apache.torque.adapter.AdapterignoreCase in class org.apache.torque.adapter.AbstractAdapterin - The string whose case to ignore.public org.apache.torque.adapter.IDMethod getIDMethodType()
getIDMethodType in interface org.apache.torque.adapter.AdaptergetIDMethodType in class org.apache.torque.adapter.AbstractAdapterAdapter.getIDMethodType()public java.lang.String getIDMethodSQL(java.lang.Object unused)
@@identity).getIDMethodSQL in interface org.apache.torque.adapter.AdaptergetIDMethodSQL in class org.apache.torque.adapter.AbstractAdapterAdapter.getIDMethodSQL(Object obj)public java.lang.String getUpdateLockClause()
getUpdateLockClause in interface org.apache.torque.adapter.AdaptergetUpdateLockClause in class org.apache.torque.adapter.AbstractAdapterpublic void lockTable(java.sql.Connection con,
java.lang.String table)
throws java.sql.SQLException
lockTable in interface org.apache.torque.adapter.AdapterlockTable in class org.apache.torque.adapter.AbstractAdaptercon - The JDBC connection to use.table - The name of the table to lock.java.sql.SQLException - No Statement could be created or executed.public void unlockTable(java.sql.Connection con,
java.lang.String table)
throws java.sql.SQLException
unlockTable in interface org.apache.torque.adapter.AdapterunlockTable in class org.apache.torque.adapter.AbstractAdaptercon - The JDBC connection to use.table - The name of the table to unlock.java.sql.SQLException - No Statement could be created or executed.public boolean supportsNativeLimit()
supportsNativeLimit in interface org.apache.torque.adapter.AdaptersupportsNativeLimit in class org.apache.torque.adapter.AbstractAdapterAbstractAdapter.supportsNativeLimit()public boolean supportsNativeOffset()
supportsNativeOffset in interface org.apache.torque.adapter.AdaptersupportsNativeOffset in class org.apache.torque.adapter.AbstractAdapterAbstractAdapter.supportsNativeOffset()public void generateLimits(org.apache.torque.sql.Query query,
long offset,
int limit)
throws org.apache.torque.TorqueException
generateLimits in interface org.apache.torque.adapter.AdaptergenerateLimits in class org.apache.torque.adapter.AbstractAdapterquery - The query to modifyoffset - the offset Valuelimit - the limit Valueorg.apache.torque.TorqueException - if any error occurs when building the querypublic boolean escapeText()
escapeText in interface org.apache.torque.adapter.AdapterescapeText in class org.apache.torque.adapter.AbstractAdapterAdapter.escapeText()public boolean useEscapeClauseForLike()
true.useEscapeClauseForLike in interface org.apache.torque.adapter.AdapteruseEscapeClauseForLike in class org.apache.torque.adapter.AbstractAdapterCopyright © 2018 DS Data Systems UK Ltd.