public class DBCSQLConnection
extends java.lang.Object
You cannot create instances of this class - they are created automatically by the connection pool as required.
In general, you do not need to use this class - use of the DBCSQLQuery
class is sufficient.
Constructor and Description |
---|
DBCSQLConnection(I_djSQLConnection realconn)
This constructor is for internal use, and should not be used by developers.
|
Modifier and Type | Method and Description |
---|---|
void |
commit()
Commits the transaction.
|
void |
commitIfInTransaction()
Convenience function to commit a transaction safely.
|
I_djSQLConnection |
getInternalConnection()
For internal use.
|
boolean |
isInTransaction()
Function to determine whether a transaction is in force.
|
void |
rollback()
Rolls back a transaction.
|
void |
rollbackIfInTransaction()
Convenience function to rollback a transaction safely.
|
void |
startTransaction()
Starts a transaction on this connection.
|
boolean |
startTransactionIfNotStarted()
Convenience function to start a transaction.
|
public DBCSQLConnection(I_djSQLConnection realconn)
public I_djSQLConnection getInternalConnection()
public void commit() throws java.sql.SQLException
startTransaction()
The function currently does nothing if a transaction was not already in progress, though this behaviour may be changed in the future.
java.sql.SQLException
public void commitIfInTransaction() throws java.sql.SQLException
Mainly used in catch blocks where the status of the transaction may be unknown.
java.sql.SQLException
public void rollbackIfInTransaction()
Mainly used in catch blocks where the status of the transaction may be unknown.
public void rollback()
startTransaction()
The function currently does nothing if a transaction was not already in progress, though this behaviour may be changed in the future.
public void startTransaction() throws java.sql.SQLException
A transaction must be completed through a commit, or a rollback, or their related convenience functions.
java.sql.SQLException
public boolean isInTransaction() throws java.sql.SQLException
java.sql.SQLException
public boolean startTransactionIfNotStarted() throws java.sql.SQLException
This is useful in core functions which may be called by other functions which may or may not have started transactions. This function returns true to denote that it has started a transaction, or false to denote that a transaction was already in effect.
java.sql.SQLException