|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.colle.sql.schema.RDBMSRuntime net.sf.colle.sql.mysql.MySQLRuntime
Implementation of known differences in the MySQL RDBMS system. Created: 22 Feb 2001
Field Summary |
Fields inherited from class net.sf.colle.sql.schema.RDBMSRuntime |
ERROR_CONSTRAINT_VIOLATED, ERROR_DUPLICATE_ROW, ERROR_UNKNOWN |
Constructor Summary | |
MySQLRuntime()
|
Method Summary | |
void |
createSequence(String psSequenceName,
int pnStartWith,
int pnIncrementBy,
Connection pxConnection)
Create a new sequence. |
void |
dropSequence(String psSequenceName,
Connection pxConnection)
Drop the sequence from the database. |
String |
getCreatTableSuffix()
Returns the vendor specific text to put at the end of a create table call so MySQL can turn on transactions. |
String |
getDatabaseURL(String psServer,
String psDatabase,
Integer pnPort)
Forms a DBMS specific database URL from the information provided. |
int |
getErrorCode(SQLException pxException)
Return error code (ERROR_*) for SQLException. |
int |
getNextValue(String psSequenceName,
Connection pxConnection)
Request a unique identifier for the following sequence name. |
ResultSet |
getTables(String psTable,
Connection pxConnection)
Wraps calls to DatabaseMetaData.getTables(). |
boolean |
isIndexRequiredOnForeignKey()
Returns true if RDBMS requires an explicit index on content before creating a foreign key. |
void |
loadCSVFile(Table pxTable,
String psCSVFile,
Connection pxConnection)
Loads a CSV file into a table. |
void |
lockTables(String[] pxTableNames,
Connection pxConnection)
Locks several tables at once. |
String |
mapJDBCType(String psJDBCType,
int pnLength,
boolean pbNullable)
Re-maps JDBC data types to vendor specific data types. |
void |
unlockTables(String[] pxTableName,
Connection pxConnection)
Unlocks tables previously locked with lockTables. |
Methods inherited from class net.sf.colle.sql.schema.RDBMSRuntime |
getInstance, getTruncName, lockTable, unlockTable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MySQLRuntime()
Method Detail |
public int getErrorCode(SQLException pxException)
RDBMSRuntime
getErrorCode
in class RDBMSRuntime
pxException
- SQL Exception
RDBMSRuntime
public ResultSet getTables(String psTable, Connection pxConnection) throws SQLException
RDBMSRuntime
getTables
in class RDBMSRuntime
SQLException
RDBMSRuntime
public void loadCSVFile(Table pxTable, String psCSVFile, Connection pxConnection)
RDBMSRuntime
loadCSVFile
in class RDBMSRuntime
RDBMSRuntime
public String mapJDBCType(String psJDBCType, int pnLength, boolean pbNullable)
RDBMSRuntime
mapJDBCType
in class RDBMSRuntime
RDBMSRuntime
public String getCreatTableSuffix()
RDBMSRuntime
getCreatTableSuffix
in class RDBMSRuntime
RDBMSRuntime
public boolean isIndexRequiredOnForeignKey()
RDBMSRuntime
isIndexRequiredOnForeignKey
in class RDBMSRuntime
RDBMSRuntime
public void dropSequence(String psSequenceName, Connection pxConnection)
RDBMSRuntime
dropSequence
in class RDBMSRuntime
psSequenceName
- name to sequencepxConnection
- database connectionRDBMSRuntime
public void createSequence(String psSequenceName, int pnStartWith, int pnIncrementBy, Connection pxConnection)
RDBMSRuntime
createSequence
in class RDBMSRuntime
psSequenceName
- name to sequencepnStartWith
- starting value of the sequencepnIncrementBy
- increment bypxConnection
- database connectionRDBMSRuntime
public int getNextValue(String psSequenceName, Connection pxConnection)
RDBMSRuntime
getNextValue
in class RDBMSRuntime
psSequenceName
- name to sequencepxConnection
- database connection
RDBMSRuntime
public String getDatabaseURL(String psServer, String psDatabase, Integer pnPort)
RDBMSRuntime
getDatabaseURL
in class RDBMSRuntime
psServer
- IP address or computer name of the server. Will not be
null.psDatabase
- name of the database. May be null if the application
does not define.pnPort
- port number of the server. May be null if the application
does not define.RDBMSRuntime
public void lockTables(String[] pxTableNames, Connection pxConnection) throws SQLException
RDBMSRuntime
lockTables
in class RDBMSRuntime
SQLException
RDBMSRuntime
public void unlockTables(String[] pxTableName, Connection pxConnection) throws SQLException
RDBMSRuntime
unlockTables
in class RDBMSRuntime
SQLException
RDBMSRuntime
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |