pub struct JsTransaction { /* private fields */ }Expand description
JavaScript-friendly transaction wrapper.
Implementations§
Source§impl JsTransaction
impl JsTransaction
Sourcepub fn insert(&mut self, table: &str, values: &JsValue) -> Result<(), JsValue>
pub fn insert(&mut self, table: &str, values: &JsValue) -> Result<(), JsValue>
Inserts rows into a table within the transaction.
Sourcepub fn update(
&mut self,
table: &str,
set_values: &JsValue,
predicate: Option<Expr>,
) -> Result<usize, JsValue>
pub fn update( &mut self, table: &str, set_values: &JsValue, predicate: Option<Expr>, ) -> Result<usize, JsValue>
Updates rows in a table within the transaction.
Trait Implementations§
Source§impl From<JsTransaction> for JsValue
impl From<JsTransaction> for JsValue
Source§fn from(value: JsTransaction) -> Self
fn from(value: JsTransaction) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for JsTransaction
impl FromWasmAbi for JsTransaction
Source§impl IntoWasmAbi for JsTransaction
impl IntoWasmAbi for JsTransaction
Source§impl LongRefFromWasmAbi for JsTransaction
impl LongRefFromWasmAbi for JsTransaction
Source§impl OptionFromWasmAbi for JsTransaction
impl OptionFromWasmAbi for JsTransaction
Source§impl OptionIntoWasmAbi for JsTransaction
impl OptionIntoWasmAbi for JsTransaction
Source§impl RefFromWasmAbi for JsTransaction
impl RefFromWasmAbi for JsTransaction
Source§type Anchor = RcRef<JsTransaction>
type Anchor = RcRef<JsTransaction>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for JsTransaction
impl RefMutFromWasmAbi for JsTransaction
Source§impl TryFromJsValue for JsTransaction
impl TryFromJsValue for JsTransaction
Source§impl VectorFromWasmAbi for JsTransaction
impl VectorFromWasmAbi for JsTransaction
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsTransaction]>
Source§impl VectorIntoWasmAbi for JsTransaction
impl VectorIntoWasmAbi for JsTransaction
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsTransaction]>) -> Self::Abi
Source§impl WasmDescribeVector for JsTransaction
impl WasmDescribeVector for JsTransaction
impl SupportsConstructor for JsTransaction
impl SupportsInstanceProperty for JsTransaction
impl SupportsStaticProperty for JsTransaction
Auto Trait Implementations§
impl Freeze for JsTransaction
impl !RefUnwindSafe for JsTransaction
impl !Send for JsTransaction
impl !Sync for JsTransaction
impl Unpin for JsTransaction
impl !UnwindSafe for JsTransaction
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
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.