Struct skytable::aio::Connection
source · [−]pub struct Connection { /* private fields */ }
aio
only.Expand description
An asynchronous database connection over Skyhash/TCP
Implementations
This function will write a Query
to the stream and read the response from the
server. It will then determine if the returned response is complete or incomplete
or invalid and return an appropriate variant of Error
wrapped in IoResult
for any I/O errors that may occur
Panics
This method will panic if the Query
supplied is empty (i.e has no arguments)
Auto Trait Implementations
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
Blanket Implementations
aio
only.Get the number of keys present in the database
fn del<'s>(
&'s mut self,
key: impl IntoSkyhashAction + 's
) -> AsyncResult<'_, SkyResult<u64>>
fn del<'s>(
&'s mut self,
key: impl IntoSkyhashAction + 's
) -> AsyncResult<'_, SkyResult<u64>>
aio
only.Deletes a single or a number of keys Read more
fn exists<'s>(
&'s mut self,
key: impl IntoSkyhashAction + 's
) -> AsyncResult<'_, SkyResult<u64>>
fn exists<'s>(
&'s mut self,
key: impl IntoSkyhashAction + 's
) -> AsyncResult<'_, SkyResult<u64>>
aio
only.Checks if a key (or keys) exist(s) Read more
aio
only.Removes all the keys present in the database
fn get<'s, T: FromSkyhashBytes>(
&'s mut self,
key: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<T>>
fn get<'s, T: FromSkyhashBytes>(
&'s mut self,
key: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<T>>
aio
only.Get the value of a key Read more
fn keylen<'s>(
&'s mut self,
key: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<u64>>
fn keylen<'s>(
&'s mut self,
key: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<u64>>
aio
only.Get the length of a key Read more
fn lskeys<'s, T: FromSkyhashBytes>(
&'s mut self,
count: u64
) -> AsyncResult<'_, SkyResult<T>>
fn lskeys<'s, T: FromSkyhashBytes>(
&'s mut self,
count: u64
) -> AsyncResult<'_, SkyResult<T>>
aio
only.Returns a vector of keys Read more
fn mget<'s, T: FromSkyhashBytes>(
&'s mut self,
keys: impl IntoSkyhashAction + 's
) -> AsyncResult<'_, SkyResult<T>>
fn mget<'s, T: FromSkyhashBytes>(
&'s mut self,
keys: impl IntoSkyhashAction + 's
) -> AsyncResult<'_, SkyResult<T>>
aio
only.Get multiple keys Read more
fn mset<'s, T: IntoSkyhashBytes + 's, U: IntoSkyhashBytes + 's>(
&'s mut self,
keys: impl GetIterator<T> + 's,
values: impl GetIterator<U> + 's
) -> AsyncResult<'_, SkyResult<u64>>
fn mset<'s, T: IntoSkyhashBytes + 's, U: IntoSkyhashBytes + 's>(
&'s mut self,
keys: impl GetIterator<T> + 's,
values: impl GetIterator<U> + 's
) -> AsyncResult<'_, SkyResult<u64>>
aio
only.Sets the value of multiple keys and values and returns the number of keys that were set Read more
fn mupdate<'s, T: IntoSkyhashBytes + 's, U: IntoSkyhashBytes + 's>(
&'s mut self,
keys: impl GetIterator<T> + 's,
values: impl GetIterator<U> + 's
) -> AsyncResult<'_, SkyResult<u64>>
fn mupdate<'s, T: IntoSkyhashBytes + 's, U: IntoSkyhashBytes + 's>(
&'s mut self,
keys: impl GetIterator<T> + 's,
values: impl GetIterator<U> + 's
) -> AsyncResult<'_, SkyResult<u64>>
aio
only.Updates the value of multiple keys and values and returns the number of keys that were updated Read more
fn pop<'s, T: FromSkyhashBytes>(
&'s mut self,
keys: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<T>>
fn pop<'s, T: FromSkyhashBytes>(
&'s mut self,
keys: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<T>>
aio
only.Consumes a key if it exists Read more
fn mpop<'s, T: FromSkyhashBytes>(
&'s mut self,
keys: impl IntoSkyhashAction + 's
) -> AsyncResult<'_, SkyResult<T>>
fn mpop<'s, T: FromSkyhashBytes>(
&'s mut self,
keys: impl IntoSkyhashAction + 's
) -> AsyncResult<'_, SkyResult<T>>
aio
only.Consumes the provided keys if they exist Read more
fn sdel<'s>(
&'s mut self,
keys: impl IntoSkyhashAction + 's
) -> AsyncResult<'_, SkyResult<bool>>
fn sdel<'s>(
&'s mut self,
keys: impl IntoSkyhashAction + 's
) -> AsyncResult<'_, SkyResult<bool>>
aio
only.Deletes all the provided keys if they exist or doesn’t do anything at all. This method will return true if all the provided keys were deleted, else it will return false Read more
fn set<'s>(
&'s mut self,
key: impl IntoSkyhashBytes + 's,
value: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<bool>>
fn set<'s>(
&'s mut self,
key: impl IntoSkyhashBytes + 's,
value: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<bool>>
aio
only.Set the value of a key Read more
fn sset<'s, T: IntoSkyhashBytes + 's, U: IntoSkyhashBytes + 's>(
&'s mut self,
keys: impl GetIterator<T> + 's,
values: impl GetIterator<U> + 's
) -> AsyncResult<'_, SkyResult<bool>>
fn sset<'s, T: IntoSkyhashBytes + 's, U: IntoSkyhashBytes + 's>(
&'s mut self,
keys: impl GetIterator<T> + 's,
values: impl GetIterator<U> + 's
) -> AsyncResult<'_, SkyResult<bool>>
aio
only.Sets the value of all the provided keys or does nothing. This method will return true if all the keys were set or will return false if none were set Read more
fn supdate<'s, T: IntoSkyhashBytes + 's, U: IntoSkyhashBytes + 's>(
&'s mut self,
keys: impl GetIterator<T> + 's,
values: impl GetIterator<U> + 's
) -> AsyncResult<'_, SkyResult<bool>>
fn supdate<'s, T: IntoSkyhashBytes + 's, U: IntoSkyhashBytes + 's>(
&'s mut self,
keys: impl GetIterator<T> + 's,
values: impl GetIterator<U> + 's
) -> AsyncResult<'_, SkyResult<bool>>
aio
only.Updates the value of all the provided keys or does nothing. This method will return true if all the keys were updated or will return false if none were updated. Read more
fn update<'s>(
&'s mut self,
key: impl IntoSkyhashBytes + 's,
value: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<()>>
fn update<'s>(
&'s mut self,
key: impl IntoSkyhashBytes + 's,
value: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<()>>
aio
only.Update the value of a key Read more
fn uset<'s, T: IntoSkyhashBytes + 's, U: IntoSkyhashBytes + 's>(
&'s mut self,
keys: impl GetIterator<T> + 's,
values: impl GetIterator<U> + 's
) -> AsyncResult<'_, SkyResult<u64>>
fn uset<'s, T: IntoSkyhashBytes + 's, U: IntoSkyhashBytes + 's>(
&'s mut self,
keys: impl GetIterator<T> + 's,
values: impl GetIterator<U> + 's
) -> AsyncResult<'_, SkyResult<u64>>
aio
only.Updates or sets all the provided keys and returns the number of keys that were set Read more
fn switch<'s, T: IntoSkyhashBytes + 's>(
&'s mut self,
entity: T
) -> AsyncResult<'_, SkyResult<()>>
fn switch<'s, T: IntoSkyhashBytes + 's>(
&'s mut self,
entity: T
) -> AsyncResult<'_, SkyResult<()>>
aio
only.This function switches to the provided entity. Read more
fn create_keyspace<'s>(
&'s mut self,
ks: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<bool>>
fn create_keyspace<'s>(
&'s mut self,
ks: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<bool>>
aio
only.Create the provided keyspace Read more
fn create_table<'s>(
&'s mut self,
table: impl CreateTableIntoQuery + 's
) -> AsyncResult<'_, SkyResult<()>>
fn create_table<'s>(
&'s mut self,
table: impl CreateTableIntoQuery + 's
) -> AsyncResult<'_, SkyResult<()>>
aio
only.Create a table from the provided configuration
fn drop_table<'s>(
&'s mut self,
table: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<bool>>
fn drop_table<'s>(
&'s mut self,
table: impl IntoSkyhashBytes + 's
) -> AsyncResult<'_, SkyResult<bool>>
aio
only.Drop the provided table Read more
fn drop_keyspace<'s>(
&'s mut self,
keyspace: impl IntoSkyhashBytes + 's,
force: bool
) -> AsyncResult<'_, SkyResult<()>>
fn drop_keyspace<'s>(
&'s mut self,
keyspace: impl IntoSkyhashBytes + 's,
force: bool
) -> AsyncResult<'_, SkyResult<()>>
aio
only.Drop the provided keyspace Read more
aio
only.Check what keyspace this connection is currently connected to
Mutably borrows from an owned value. Read more