pub struct Session<'w> {
pub database: &'w mut dyn Database,
pub pending: bool,
/* private fields */
}Expand description
A run unit’s connection to its database, and the state the runtime keeps rather than asking the backend, so every backend answers alike.
Fields§
§database: &'w mut dyn Database§pending: boolWhether any statement has reached the database since the last COMMIT or ROLLBACK.
Implementations§
Source§impl<'w> Session<'w>
impl<'w> Session<'w>
pub fn new(database: &'w mut (dyn Database + '_)) -> Self
pub fn cursor(&mut self, program: &str, name: &str) -> Option<&mut OpenCursor>
pub fn opened(&mut self, program: &str, name: &str, with_hold: bool)
pub fn closed(&mut self, program: &str, name: &str)
Sourcepub fn committed(&mut self)
pub fn committed(&mut self)
COMMIT closes every cursor not declared WITH HOLD, and leaves a held one before its next row.
pub fn rolled_back(&mut self)
Auto Trait Implementations§
impl<'w> !RefUnwindSafe for Session<'w>
impl<'w> !Send for Session<'w>
impl<'w> !Sync for Session<'w>
impl<'w> !UnwindSafe for Session<'w>
impl<'w> Freeze for Session<'w>
impl<'w> Unpin for Session<'w>
impl<'w> UnsafeUnpin for Session<'w>
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