Skip to main content

TenantDataTransaction

Struct TenantDataTransaction 

Source
pub struct TenantDataTransaction<'a> { /* private fields */ }
Expand description

The application view of a tenant transaction.

This type intentionally exposes no raw transaction handle, commit operation, or option setters. Every key-bearing operation takes a validated data key or range so application callbacks cannot modify kit metadata.

Implementations§

Source§

impl<'a> TenantDataTransaction<'a>

Source

pub fn set_size_limit(&self, limit: TenantTransactionSizeLimit) -> FdbResult<()>

Applies a validated cluster-side size ceiling before application operations.

Source

pub async fn get( &self, key: TenantDataKey<'_>, snapshot: bool, ) -> FdbResult<Option<FdbSlice>>

Reads an application key, preserving FoundationDB’s retryable error.

Source

pub fn set( &self, key: TenantDataKey<'_>, value: &[u8], ) -> Result<(), TenantDataAccessErrorReason>

Writes a bounded value under an application key.

Source

pub fn clear(&self, key: TenantDataKey<'_>)

Removes one application key. A read-policy attempt aborts the enclosing transaction even though this compatibility method returns no result.

Source

pub fn try_clear( &self, key: TenantDataKey<'_>, ) -> Result<(), TenantDataAccessErrorReason>

Checks the write policy before removing one application key.

Source

pub fn clear_range(&self, range: &TenantDataRange<'_>)

Removes only the validated application interval. A read-policy attempt aborts the enclosing transaction even though this method returns no result.

Source

pub fn try_clear_range( &self, range: &TenantDataRange<'_>, ) -> Result<(), TenantDataAccessErrorReason>

Checks the write policy before clearing an application interval.

Source

pub fn atomic_op( &self, key: TenantDataKey<'_>, parameter: &[u8], mutation: MutationType, ) -> Result<(), TenantDataAccessErrorReason>

Applies an atomic mutation to an application key.

Source

pub fn set_versionstamped_key( &self, key_template: &[u8], value: &[u8], ) -> Result<(), TenantDataAccessErrorReason>

Writes a tuple-layer versionstamped key whose stable prefix is tenant data.

The incomplete versionstamp must lie after the first six key bytes so commit-time substitution cannot move a key into kit metadata or system space.

Source

pub async fn get_range( &self, range: &TenantDataRange<'_>, limit: TenantDataRangeLimit, snapshot: bool, ) -> FdbResult<FdbValues>

Reads one bounded page from an application range.

Source

pub async fn get_range_with_target( &self, range: &TenantDataRange<'_>, limit: TenantDataRangeLimit, target_bytes: TenantDataRangeTargetBytes, snapshot: bool, ) -> FdbResult<FdbValues>

Reads a bounded page with an application-selected response byte target.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.