Package com.mckoi.database
Class InternalJDBCHelper
- java.lang.Object
-
- com.mckoi.database.InternalJDBCHelper
-
class InternalJDBCHelper extends java.lang.ObjectHelper and convenience methods and classes for creating a JDBC interface that has direct access to an open transaction of a DatabaseConnection. This class allows us to provide JDBC access to stored procedures from inside the engine.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classInternalJDBCHelper.InternalConnectionA derived java.sql.Connection class from MConnection.private static classInternalJDBCHelper.InternalDatabaseInterfaceAn implementation of DatabaseInterface used to execute queries on the DatabaseConnection and return results to the JDBC client.
-
Constructor Summary
Constructors Constructor Description InternalJDBCHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.sql.ConnectioncreateJDBCConnection(User user, DatabaseConnection connection)Returns a java.sql.Connection object that is bound to the given DatabaseConnection object.(package private) static voiddisposeJDBCConnection(java.sql.Connection jdbc_connection)Disposes the JDBC Connection object returned by the 'createJDBCConnection' method.
-
-
-
Method Detail
-
createJDBCConnection
static java.sql.Connection createJDBCConnection(User user, DatabaseConnection connection)
Returns a java.sql.Connection object that is bound to the given DatabaseConnection object. Queries executed on the Connection alter the currently open transaction.Note: It is assumed that the DatabaseConnection is locked in exclusive mode when a query is executed (eg. via the 'executeXXX' methods in Statement).
Note: Auto-commit is DISABLED for the SQL connection and can not be enabled.
-
disposeJDBCConnection
static void disposeJDBCConnection(java.sql.Connection jdbc_connection) throws java.sql.SQLExceptionDisposes the JDBC Connection object returned by the 'createJDBCConnection' method. This should be called to free resources associated with the connection object.After this has completed the given Connection object in invalidated.
- Throws:
java.sql.SQLException
-
-