![]() |
OCILIB (C and C++ Driver for Oracle)
4.9.0
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
OcilibCApiPools
OCILIB supports both local and global transactions.
Local transactions are implicit within connection objects and require no specific API call or programming step to use.
To control changes made in the database:
OCILIB also supports an 'Auto Commit' mode that performs an implicit commit after every statement execution.
OCILIB supports them by:
Functions | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_Commit (OCI_Connection *con) |
| Commit current pending changes. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_Rollback (OCI_Connection *con) |
| Roll back current pending changes. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_SetAutoCommit (OCI_Connection *con, boolean enable) |
| Enable or disable auto-commit mode. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_GetAutoCommit (OCI_Connection *con) |
| Return the current auto-commit mode status. | |
| OCI_SYM_PUBLIC OCI_Transaction *OCI_API | OCI_TransactionCreate (OCI_Connection *con, unsigned int timeout, unsigned int mode, OCI_XID *pxid) |
| Create a new global transaction or a serializable/read-only local transaction. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_TransactionFree (OCI_Transaction *trans) |
| Free a transaction object. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_TransactionStart (OCI_Transaction *trans) |
| Start a global transaction. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_TransactionStop (OCI_Transaction *trans) |
| Stop a global transaction. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_TransactionResume (OCI_Transaction *trans) |
| Resume a stopped global transaction. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_TransactionPrepare (OCI_Transaction *trans) |
| Prepare a global transaction for two-phase commit validation. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_TransactionForget (OCI_Transaction *trans) |
| Cancel a previously prepared global transaction validation. | |
| OCI_SYM_PUBLIC unsigned int OCI_API | OCI_TransactionGetMode (OCI_Transaction *trans) |
| Return the global transaction mode. | |
| OCI_SYM_PUBLIC unsigned int OCI_API | OCI_TransactionGetTimeout (OCI_Transaction *trans) |
| Return the global transaction timeout. | |
| OCI_SYM_PUBLIC boolean OCI_API OCI_Commit | ( | OCI_Connection * | con | ) |
#include <api.h>
Commit current pending changes.
| con | - Connection handle |
Referenced by ocilib::Connection::Commit().
| OCI_SYM_PUBLIC boolean OCI_API OCI_Rollback | ( | OCI_Connection * | con | ) |
#include <api.h>
Roll back current pending changes.
| con | - Connection handle |
Referenced by ocilib::Connection::Rollback().
| OCI_SYM_PUBLIC boolean OCI_API OCI_SetAutoCommit | ( | OCI_Connection * | con, |
| boolean | enable | ||
| ) |
#include <api.h>
Enable or disable auto-commit mode.
When enabled, all pending changes are automatically committed after every successful statement execution.
| con | - Connection handle |
| enable | - TRUE to enable auto-commit, FALSE to disable it |
Referenced by ocilib::Connection::SetAutoCommit().
| OCI_SYM_PUBLIC boolean OCI_API OCI_GetAutoCommit | ( | OCI_Connection * | con | ) |
#include <api.h>
Return the current auto-commit mode status.
| con | - Connection handle |
Referenced by ocilib::Connection::GetAutoCommit().
| OCI_SYM_PUBLIC OCI_Transaction *OCI_API OCI_TransactionCreate | ( | OCI_Connection * | con, |
| unsigned int | timeout, | ||
| unsigned int | mode, | ||
| OCI_XID * | pxid | ||
| ) |
#include <api.h>
Create a new global transaction or a serializable/read-only local transaction.
| con | - Connection handle |
| timeout | - Time (in seconds) that a transaction stays inactive after being stopped |
| mode | - Transaction mode |
| pxid | - Pointer to a global transaction identifier structure (XID) |
Referenced by ocilib::Transaction::Transaction().
| OCI_SYM_PUBLIC boolean OCI_API OCI_TransactionFree | ( | OCI_Transaction * | trans | ) |
#include <api.h>
Free a transaction object.
| trans | - Transaction handle |
| OCI_SYM_PUBLIC boolean OCI_API OCI_TransactionStart | ( | OCI_Transaction * | trans | ) |
#include <api.h>
Start a global transaction.
| trans | - Transaction handle |
Referenced by ocilib::Transaction::Start().
| OCI_SYM_PUBLIC boolean OCI_API OCI_TransactionStop | ( | OCI_Transaction * | trans | ) |
#include <api.h>
Stop a global transaction.
| trans | - Transaction handle |
Referenced by ocilib::Transaction::Stop().
| OCI_SYM_PUBLIC boolean OCI_API OCI_TransactionResume | ( | OCI_Transaction * | trans | ) |
#include <api.h>
Resume a stopped global transaction.
| trans | - Transaction handle |
Referenced by ocilib::Transaction::Resume().
| OCI_SYM_PUBLIC boolean OCI_API OCI_TransactionPrepare | ( | OCI_Transaction * | trans | ) |
#include <api.h>
Prepare a global transaction for two-phase commit validation.
| trans | - Transaction handle |
Referenced by ocilib::Transaction::Prepare().
| OCI_SYM_PUBLIC boolean OCI_API OCI_TransactionForget | ( | OCI_Transaction * | trans | ) |
#include <api.h>
Cancel a previously prepared global transaction validation.
| trans | - Transaction handle |
Referenced by ocilib::Transaction::Forget().
| OCI_SYM_PUBLIC unsigned int OCI_API OCI_TransactionGetMode | ( | OCI_Transaction * | trans | ) |
#include <api.h>
Return the global transaction mode.
| trans | - Transaction handle |
Referenced by ocilib::Transaction::GetFlags().
| OCI_SYM_PUBLIC unsigned int OCI_API OCI_TransactionGetTimeout | ( | OCI_Transaction * | trans | ) |
#include <api.h>
Return the global transaction timeout.
| trans | - Transaction handle |
Referenced by ocilib::Transaction::GetTimeout().