pub struct Database { /* private fields */ }Implementations§
Source§impl Database
impl Database
pub fn id(&self) -> &str
pub fn client(&self) -> &HeyoClient
pub async fn create( options: DatabaseCreateOptions, client_options: HeyoClientOptions, ) -> Result<Self, HeyoError>
pub async fn list( client_options: HeyoClientOptions, ) -> Result<Vec<DatabaseInfo>, HeyoError>
pub async fn get( id: &str, client_options: HeyoClientOptions, ) -> Result<Self, HeyoError>
Sourcepub async fn regions(
client_options: HeyoClientOptions,
) -> Result<Vec<String>, HeyoError>
pub async fn regions( client_options: HeyoClientOptions, ) -> Result<Vec<String>, HeyoError>
GET /sqlite-regions — region slugs valid for create.
pub async fn info(&self) -> Result<DatabaseInfo, HeyoError>
pub async fn delete(&self) -> Result<(), HeyoError>
Sourcepub async fn exec(
&self,
sql: &str,
args: Vec<SqlValue>,
options: ExecOptions,
) -> Result<ExecResult, HeyoError>
pub async fn exec( &self, sql: &str, args: Vec<SqlValue>, options: ExecOptions, ) -> Result<ExecResult, HeyoError>
Run a single SQL statement.
Sourcepub async fn batch(
&self,
statements: Vec<SqlStatement>,
options: ExecOptions,
) -> Result<BatchResult, HeyoError>
pub async fn batch( &self, statements: Vec<SqlStatement>, options: ExecOptions, ) -> Result<BatchResult, HeyoError>
Run multiple statements.
pub async fn connect_token( &self, options: ConnectionTokenOptions, ) -> Result<ConnectionToken, HeyoError>
Sourcepub async fn connection_info(&self) -> Result<(String, String), HeyoError>
pub async fn connection_info(&self) -> Result<(String, String), HeyoError>
URL for the libsql HTTP transport (no token).
pub async fn list_connections( &self, ) -> Result<Vec<ConnectionTokenInfo>, HeyoError>
pub async fn revoke_connection(&self, token_id: &str) -> Result<(), HeyoError>
Sourcepub async fn checkout(&self) -> Result<CheckoutResult, HeyoError>
pub async fn checkout(&self) -> Result<CheckoutResult, HeyoError>
Download the canonical gzipped sqlite snapshot. Carry
data_version to checkin to enable optimistic concurrency.
Sourcepub async fn checkin(
&self,
bytes: Vec<u8>,
options: CheckinOptions,
) -> Result<CheckinResult, HeyoError>
pub async fn checkin( &self, bytes: Vec<u8>, options: CheckinOptions, ) -> Result<CheckinResult, HeyoError>
Upload an edited sqlite file. Optimistic concurrency on
expected_version unless force is set.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Database
impl !UnwindSafe for Database
impl Freeze for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnsafeUnpin for Database
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