| java.lang.Object org.apache.torque.adapter.AbstractDBAdapter org.apache.torque.adapter.DBMM
DBMM | public class DBMM extends AbstractDBAdapter (Code) | | This is used in order to connect to a MySQL database using the MM
drivers. Simply comment the above and uncomment this code below and
fill in the appropriate values for DB_NAME, DB_HOST, DB_USER,
DB_PASS.
http://www.mysql.com/
"jdbc:mysql://" + DB_HOST + "/" + DB_NAME + "?user=" +
DB_USER + "&password=" + DB_PASS;
author: Jon S. Stevens author: Brett McLaughlin author: Daniel Rall version: $Id: DBMM.java 522044 2007-03-24 16:00:57Z tfischer $ |
Constructor Summary | |
protected | DBMM() Empty protected constructor. |
DBMM | protected DBMM()(Code) | | Empty protected constructor.
|
generateLimits | public void generateLimits(Query query, int offset, int limit)(Code) | | Generate a LIMIT offset, limit clause if offset > 0
or an LIMIT limit clause if limit is > 0 and offset
is 0.
Parameters: query - The query to modify Parameters: offset - the offset Value Parameters: limit - the limit Value |
getDateString | public String getDateString(Date date)(Code) | | This method overrides the JDBC escapes used to format dates
using a DateFormat . As of version 2.0.11, the MM
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_MYSQL. |
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. exception: SQLException - No Statement could be created orexecuted. |
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. exception: SQLException - No Statement could be created orexecuted. |
|
|