pub struct CrudTransaction<'a> {
pub last_item_id: i64,
pub id: Option<i64>,
pub crud: Vec<CrudEntry>,
/* private fields */
}Expand description
All local writes that were made in a single SQLite transaction.
Fields§
§last_item_id: i64§id: Option<i64>Unique transaction id.
If null, this contains a list of changes recorded without an explicit transaction associated.
crud: Vec<CrudEntry>List of client-side changes.
Implementations§
Source§impl<'a> CrudTransaction<'a>
impl<'a> CrudTransaction<'a>
Sourcepub async fn complete(self) -> Result<(), PowerSyncError>
pub async fn complete(self) -> Result<(), PowerSyncError>
Call to remove the changes from the local queue, once successfully uploaded.
Sourcepub async fn complete_with_checkpoint(
self,
checkpoint: i64,
) -> Result<(), PowerSyncError>
pub async fn complete_with_checkpoint( self, checkpoint: i64, ) -> Result<(), PowerSyncError>
Call to remove the changes from the local queue, once successfully uploaded.
Auto Trait Implementations§
impl<'a> Freeze for CrudTransaction<'a>
impl<'a> !RefUnwindSafe for CrudTransaction<'a>
impl<'a> Send for CrudTransaction<'a>
impl<'a> Sync for CrudTransaction<'a>
impl<'a> Unpin for CrudTransaction<'a>
impl<'a> !UnwindSafe for CrudTransaction<'a>
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