Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.imaginary.sql.msql.MsqlConnection
Field Summary | |
java.lang.String | database
|
MsqlInputStream | input
|
MsqlOutputStream | output
|
java.lang.String | url
|
java.lang.String | user
|
int | version
|
java.lang.String | versionString
|
Method Summary | |
void | clearWarnings()
Since mSQL produces no warnings, this is a NO-OP |
void | close()
Closes this database connection. |
void | commit()
This is a NO-OP for mSQL. All statements are always auto-committed. |
java.sql.Statement | createStatement()
This JDBC method creates an instance of MsqlStatement that is forward-only and read-only. |
java.sql.Statement | createStatement(int type,
int concur)
Creates a JDBC Statement whose result sets have the specified cursor type and concurrency model. |
boolean | getAutoCommit()
This method always returns true since mSQL is always in auto-commit mode. |
java.lang.String | getCatalog()
Provides the catalog name. |
java.lang.String | getEncoding()
|
java.sql.DatabaseMetaData | getMetaData()
Provides meta-data for the database connection. |
int | getTransactionIsolation()
|
java.util.Map | getTypeMap()
|
java.lang.String | getUser()
|
java.sql.SQLWarning | getWarnings()
mSQL does not have warnings. |
boolean | isClosed()
|
boolean | isReadOnly()
mSQL does not support read only connections, only read-only access rights. |
java.lang.String | nativeSQL(java.lang.String sql)
This gives the driver an opportunity to turn JDBC compliant SQL into mSQL specific SQL. My feeling is why bother. |
java.sql.CallableStatement | prepareCall(java.lang.String unused)
Callable statements are not supported by mSQL. This will therefore always throw an exception. |
java.sql.CallableStatement | prepareCall(java.lang.String unused,
int type,
int concur)
Callable statements are not supported by mSQL. This will therefore always throw an exception. |
java.sql.PreparedStatement | prepareStatement(java.lang.String sql)
Constructs a PreparedStatement matching the specified statement. |
java.sql.PreparedStatement | prepareStatement(java.lang.String sql,
int type,
int concur)
Creates a prepared statement with the specified type and concurrency for its result sets. |
void | rollback()
This method always errors since you cannot rollback an mSQL transaction. |
void | setAutoCommit(boolean b)
This method will thrown an exception if you try to turn auto-commit off since JDBC does not support transactional logic. |
void | setCatalog(java.lang.String db)
Selects the database to be used by this connection. |
void | setReadOnly(boolean b)
mSQL does not support read-only mode. |
void | setTransactionIsolation(int unused)
This is not supported by mSQL, thus this is a NO-OP. The transaction isolation level is always set to Connection. |
void | setTypeMap(java.util.Map map)
Sets the type map for this connection. |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Field Detail |
protected java.lang.String database
protected MsqlInputStream input
protected MsqlOutputStream output
protected java.lang.String url
protected java.lang.String user
protected int version
protected java.lang.String versionString
Method Detail |
public void clearWarnings() throws java.sql.SQLException
public void close() throws java.sql.SQLException
public void commit() throws java.sql.SQLException
public java.sql.Statement createStatement() throws java.sql.SQLException
public java.sql.Statement createStatement(int type, int concur) throws java.sql.SQLException
type
- the result set type for the statement
concur
- the result set concurrencypublic boolean getAutoCommit() throws java.sql.SQLException
public java.lang.String getCatalog() throws java.sql.SQLException
public java.lang.String getEncoding()
public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
public int getTransactionIsolation() throws java.sql.SQLException
public java.util.Map getTypeMap() throws java.sql.SQLException
public java.lang.String getUser() throws java.sql.SQLException
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
public boolean isClosed()
public boolean isReadOnly() throws java.sql.SQLException
public java.lang.String nativeSQL(java.lang.String sql) throws java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String unused) throws java.sql.SQLException
unused
- the name of the stored procedurepublic java.sql.CallableStatement prepareCall(java.lang.String unused, int type, int concur) throws java.sql.SQLException
unused
- the name of the stored procedure
type
- the type of the procs result sets
concur
- the concurrency of the result setspublic java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
sql
- the prepared statementpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql, int type, int concur) throws java.sql.SQLException
sql
- the SQL of the prepared statement
type
- the type of the result sets for the prepared statements
concur
- the concurrency of the result setspublic void rollback() throws java.sql.SQLException
public void setAutoCommit(boolean b) throws java.sql.SQLException
b
- should always be truepublic void setCatalog(java.lang.String db) throws java.sql.SQLException
db
- the name of the mSQL databasepublic void setReadOnly(boolean b) throws java.sql.SQLException
b
- should only ever be falsepublic void setTransactionIsolation(int unused) throws java.sql.SQLException
unused
- the transaction isolation levelpublic void setTypeMap(java.util.Map map) throws java.sql.SQLException
map
- the new type mapOverview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |