pub struct ReadTransaction { /* private fields */ }Expand description
An explicit, snapshot-stable read transaction.
Read transactions are movable between threads but deliberately not Sync;
one caller issues one operation at a time through &mut self.
Implementations§
Source§impl ReadTransaction
impl ReadTransaction
Sourcepub fn retrieve_json(&mut self, request: &str) -> Result<String>
pub fn retrieve_json(&mut self, request: &str) -> Result<String>
Retrieve from this reader’s pinned table/index generation. Existing session scan/materialization/deadline/cancellation limits remain active.
Sourcepub const fn snapshot_tx(&self) -> TxId
pub const fn snapshot_tx(&self) -> TxId
The latest committed transaction visible when this read began.
Sourcepub fn query(&mut self, sql: &str) -> Result<QueryResult>
pub fn query(&mut self, sql: &str) -> Result<QueryResult>
Execute a read-only statement with the transaction’s limits.
Sourcepub fn query_with(&mut self, sql: &str, params: &[Value]) -> Result<QueryResult>
pub fn query_with(&mut self, sql: &str, params: &[Value]) -> Result<QueryResult>
Execute a parameterized read-only statement with the transaction’s limits.
Sourcepub fn query_with_limits(
&mut self,
sql: &str,
params: &[Value],
limits: QueryLimits,
) -> Result<QueryResult>
pub fn query_with_limits( &mut self, sql: &str, params: &[Value], limits: QueryLimits, ) -> Result<QueryResult>
Execute a parameterized read-only statement with limits no weaker than the transaction’s original limits.
Trait Implementations§
Source§impl Drop for ReadTransaction
impl Drop for ReadTransaction
Auto Trait Implementations§
impl !RefUnwindSafe for ReadTransaction
impl !Sync for ReadTransaction
impl Forget for ReadTransaction
impl Freeze for ReadTransaction
impl Move for ReadTransaction
impl Send for ReadTransaction
impl Unpin for ReadTransaction
impl UnsafeUnpin for ReadTransaction
impl UnwindSafe for ReadTransaction
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