| java.lang.Object org.apache.torque.adapter.AbstractDBAdapter org.apache.torque.adapter.DBSybase
All known Subclasses: org.apache.torque.adapter.DBMSSQL,
DBSybase | public class DBSybase extends AbstractDBAdapter (Code) | | This is used to connect to a Sybase database using Sybase's
JConnect JDBC driver.
NOTE:Currently JConnect does not implement the required
methods for ResultSetMetaData, and therefore the village API's may
not function. For connection pooling, everything works.
author: Jeff Brekke version: $Id: DBSybase.java 586553 2007-10-19 17:33:53Z gmonroe $ |
Constructor Summary | |
protected | DBSybase() Empty constructor. |
DBSybase | protected DBSybase()(Code) | | Empty constructor.
|
escapeText | public boolean escapeText()(Code) | | Determines 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 "\".
Sybase (and MSSQL) doesn't define a default escape character,
so false is returned.
false See Also: org.apache.torque.adapter.DB.escapeText |
generateLimits | public void generateLimits(Query query, int offset, int limit) throws TorqueException(Code) | | Modify a query to add limit and offset values for Sybase.
Parameters: query - The query to modify Parameters: offset - the offset Value Parameters: limit - the limit Value throws: TorqueException - if any error occurs when building the query |
getDateString | public String getDateString(Date date)(Code) | | This method overrides the JDBC escapes used to format dates
using a DateFormat . As of version 11, the Sybase
JDBC driver does not implement JDBC 3.0 escapes.
Parameters: date - the date to format The properly formatted date String. |
getLimitStyle | public int getLimitStyle()(Code) | | This method is used to chek whether the database supports
limiting the size of the resultset.
LIMIT_STYLE_SYBASE. |
ignoreCase | public String ignoreCase(String in)(Code) | | This method is used to ignore case.
Parameters: in - The string whose case to ignore. The string in a case that can be ignored. |
lockTable | public void lockTable(Connection con, String table) throws SQLException(Code) | | Locks the specified table.
Parameters: con - The JDBC connection to use. Parameters: table - The name of the table to lock. throws: SQLException - No Statement could be created or executed. |
toUpperCase | public String toUpperCase(String in)(Code) | | This method is used to ignore case.
Parameters: in - The string to transform to upper case. The upper case string. |
unlockTable | public void unlockTable(Connection con, String table) throws SQLException(Code) | | Unlocks the specified table.
Parameters: con - The JDBC connection to use. Parameters: table - The name of the table to unlock. throws: SQLException - No Statement could be created or executed. |
useEscapeClauseForLike | public boolean useEscapeClauseForLike()(Code) | | Whether an escape clause in like should be used.
Example : select * from AUTHOR where AUTHOR.NAME like '\_%' ESCAPE '\';
Sybase needs this, so this implementation always returns
true .
whether the escape clause should be appended or not. |
|
|