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, useMinusForExcept
public String toUpperCase(String in)
toUpperCase
in interface Adapter
toUpperCase
in class AbstractAdapter
in
- The string to transform to upper case.public String ignoreCase(String in)
ignoreCase
in interface Adapter
ignoreCase
in class AbstractAdapter
in
- The string whose case to ignore.public IDMethod getIDMethodType()
AbstractAdapter
IDMethod
interface denoting which
type of primary key generation method this type of RDBMS uses.getIDMethodType
in interface Adapter
getIDMethodType
in class AbstractAdapter
Adapter.getIDMethodType()
public String getIDMethodSQL(Object unused)
@@identity
).getIDMethodSQL
in interface Adapter
getIDMethodSQL
in class AbstractAdapter
unused
- Information used for key generation.Adapter.getIDMethodSQL(Object obj)
public String getUpdateLockClause()
getUpdateLockClause
in interface Adapter
getUpdateLockClause
in class AbstractAdapter
public void lockTable(Connection con, String table) throws SQLException
lockTable
in interface Adapter
lockTable
in class AbstractAdapter
con
- 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 Adapter
unlockTable
in class AbstractAdapter
con
- 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 Adapter
supportsNativeOffset
in class AbstractAdapter
public void generateLimits(Query query, long offset, int limit) throws TorqueException
generateLimits
in interface Adapter
generateLimits
in class AbstractAdapter
query
- The query to modifyoffset
- the offset Valuelimit
- the limit ValueTorqueException
- if any error occurs when building the querypublic boolean escapeText()
escapeText
in interface Adapter
escapeText
in class AbstractAdapter
Adapter.escapeText()
public boolean useEscapeClauseForLike()
true
.useEscapeClauseForLike
in interface Adapter
useEscapeClauseForLike
in class AbstractAdapter
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.