All Packages Class Hierarchy This Package Previous Next Index
Class com.imaginary.sql.msql.MsqlConnection
java.lang.Object
|
+----com.imaginary.sql.msql.MsqlConnection
- public class MsqlConnection
- extends Object
- implements Connection
The MsqlConnection class is an implementation of the JDBC Connection
interface that represents a database transaction. This class should
never be directly instantiated by an application, but instead should
be gotten by calling DriverManager.getConnection().
Last modified $Date: 1999/01/22 05:33:41 $
- Version:
- $Revision: 1.1.2.1.2.1 $
- Author:
- George Reese (borg@imaginary.com)
- See Also:
- getConnection
-
clearWarnings()
- Sets the SQLWarning chain to null.
-
close()
- Closes this database connection.
-
commit()
- This is a NO-OP for mSQL.
-
createStatement()
- This JDBC method creates an instance of MsqlStatement and
returns it.
-
getAutoCommit()
- This method always returns true since mSQL is always in auto-commit
mode.
-
getCatalog()
- Provides the catalog name.
-
getMetaData()
- This method is not yet implemented.
-
getTransactionIsolation()
-
-
getUser()
-
-
getWarnings()
-
-
isClosed()
-
-
isReadOnly()
-
-
nativeSQL(String)
- This gives the driver an opportunity to turn JDBC compliant SQL
into mSQL specific SQL.
-
prepareCall(String)
- Callable statements are not supported by mSQL.
-
prepareStatement(String)
- Constructs a prepared statement.
-
rollback()
- This method always errors since you cannot rollback an mSQL
transaction.
-
setAutoCommit(boolean)
- This method will thrown an exception if you try to turn auto-commit
off since JDBC does not support transactional logic.
-
setCatalog(String)
- Sets the catalog name for this connection.
-
setReadOnly(boolean)
- mSQL does not support read-only mode.
-
setTransactionIsolation(int)
- This is not supported by mSQL, thus this is a NO-OP.
isClosed
public synchronized boolean isClosed() throws SQLException
- Returns:
- true if this Connection has been closed
- Throws: SQLException
- never thrown
isReadOnly
public boolean isReadOnly() throws SQLException
- Returns:
- false--always
getAutoCommit
public boolean getAutoCommit() throws SQLException
- This method always returns true since mSQL is always in auto-commit
mode.
- Returns:
- true--always
- Throws: SQLException
- never thrown
setAutoCommit
public void setAutoCommit(boolean b) throws SQLException
- This method will thrown an exception if you try to turn auto-commit
off since JDBC does not support transactional logic.
- Parameters:
- b - should always be true
- Throws: SQLException
- thrown if the param is false
getCatalog
public synchronized String getCatalog() throws SQLException
- Provides the catalog name. mSQL does not support catalogs,
however.
- Throws: SQLException
- never thrown
setCatalog
public synchronized void setCatalog(String str) throws SQLException
- Sets the catalog name for this connection. mSQL does not support
catalogs, so this method is a NO-OP.
- Throws: SQLException
- never thrown
getMetaData
public DatabaseMetaData getMetaData() throws SQLException
- This method is not yet implemented.
setReadOnly
public void setReadOnly(boolean b) throws SQLException
- mSQL does not support read-only mode.
- Throws: SQLException
- alway thrown
getTransactionIsolation
public synchronized int getTransactionIsolation() throws SQLException
- Returns:
- the transaction isolation, not supported by mSQL
- Throws: SQLException
- never thrown
setTransactionIsolation
public synchronized void setTransactionIsolation(int x) throws SQLException
- This is not supported by mSQL, thus this is a NO-OP.
- Throws: SQLException
- never thrown
getUser
public String getUser() throws SQLException
- Returns:
- the user name used for this Connection
- Throws: SQLException
- thrown if the connection is never made
getWarnings
public synchronized SQLWarning getWarnings() throws SQLException
- Returns:
- the SQLWarning chain for this Connection
- Throws: SQLException
- never thrown
clearWarnings
public synchronized void clearWarnings() throws SQLException
- Sets the SQLWarning chain to null.
- Throws: SQLException
- never thrown
close
public synchronized void close() throws SQLException
- Closes this database connection. It will also close any associated
Statement instance.
- Throws: SQLException
- thrown if problems occur
commit
public void commit() throws SQLException
- This is a NO-OP for mSQL. All statements are always auto-committed.
- Throws: SQLException
- never thrown
createStatement
public Statement createStatement() throws SQLException
- This JDBC method creates an instance of MsqlStatement and
returns it. If there are currently any open MsqlStatement's, it
will close them. Not that mSQL does not provide a way to
interrupt executing statements, so it has to wait for any
pending statements to finish before closing them.
- Returns:
- a new MsqlStatement instance
- Throws: SQLException
- an error occurred in creating the
Statement instance, likely raised by the constructor
nativeSQL
public String nativeSQL(String sql) throws SQLException
- This gives the driver an opportunity to turn JDBC compliant SQL
into mSQL specific SQL. My feeling is why bother.
- Throws: SQLException
- never thrown
prepareCall
public CallableStatement prepareCall(String sql) throws SQLException
- Callable statements are not supported by mSQL. This will therefore
always throw an exception.
prepareStatement
public PreparedStatement prepareStatement(String sql) throws SQLException
- Constructs a prepared statement.
- Parameters:
- sql - the prepared SQL
- Returns:
- a prepared statement.
- Throws: SQLException
- a database error occurred
rollback
public void rollback() throws SQLException
- This method always errors since you cannot rollback an mSQL
transaction.
All Packages Class Hierarchy This Package Previous Next Index