Struct oracle::oci_attr::TransactionInProgress
source · pub struct TransactionInProgress;
Expand description
A type parameter for Connection::oci_attr
to get OCI_ATTR_TRANSACTION_IN_PROGRESS
as bool
,
which indicates whether the connection has a currently active transaction.
Note that this requires Oracle client 12.1 or later.
§Examples
use oracle::oci_attr::TransactionInProgress;
// no active transaction at first
assert_eq!(conn.oci_attr::<TransactionInProgress>()?, false);
// start a transaction
conn.execute("insert into TestTempTable values (1, 'val1')", &[])?;
assert_eq!(conn.oci_attr::<TransactionInProgress>()?, true);
// rollback the transction
conn.rollback()?;
assert_eq!(conn.oci_attr::<TransactionInProgress>()?, false);
Trait Implementations§
source§impl OciAttr for TransactionInProgress
impl OciAttr for TransactionInProgress
§type HandleType = Session
type HandleType = Session
Auto Trait Implementations§
impl RefUnwindSafe for TransactionInProgress
impl Send for TransactionInProgress
impl Sync for TransactionInProgress
impl Unpin for TransactionInProgress
impl UnwindSafe for TransactionInProgress
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more