Struct libsql_client::client::SyncClient
source · pub struct SyncClient { /* private fields */ }
Expand description
A synchronous flavor of Client
. All its public methods are synchronous,
to make it usable in environments that don’t support async/await.
Implementations§
source§impl SyncClient
impl SyncClient
pub fn from_config(config: Config) -> Result<Self>
pub fn from_env() -> Result<Self>
pub fn from_workers_env(env: &Env) -> Result<Self>
pub fn batch<I: IntoIterator<Item = impl Into<Statement> + Send> + Send>( &self, stmts: I ) -> Result<Vec<ResultSet>>where <I as IntoIterator>::IntoIter: Send,
pub fn execute(&self, stmt: impl Into<Statement> + Send) -> Result<ResultSet>
pub fn transaction(&self) -> Result<SyncTransaction<'_>>
pub fn execute_in_transaction( &self, tx_id: u64, stmt: Statement ) -> Result<ResultSet>
pub fn commit_transaction(&self, tx_id: u64) -> Result<()>
pub fn rollback_transaction(&self, tx_id: u64) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for SyncClient
impl Send for SyncClient
impl Sync for SyncClient
impl Unpin for SyncClient
impl !UnwindSafe for SyncClient
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