pub trait AsyncDdl: AsyncSocket {
    fn switch<'s, T: IntoSkyhashBytes + 's>(
        &'s mut self,
        entity: T
    ) -> AsyncResult<'_, SkyResult<()>> { ... }
fn create_keyspace<'s>(
        &'s mut self,
        ks: impl IntoSkyhashBytes + 's
    ) -> AsyncResult<'_, SkyResult<bool>> { ... }
fn create_table<'s>(
        &'s mut self,
        table: impl CreateTableIntoQuery + 's
    ) -> AsyncResult<'_, SkyResult<()>> { ... }
fn drop_table<'s>(
        &'s mut self,
        table: impl IntoSkyhashBytes + 's
    ) -> AsyncResult<'_, SkyResult<bool>> { ... }
fn drop_keyspace<'s>(
        &'s mut self,
        keyspace: impl IntoSkyhashBytes + 's,
        force: bool
    ) -> AsyncResult<'_, SkyResult<()>> { ... }
fn whereami<'s>(&'s mut self) -> AsyncResult<'_, SkyResult<WhereAmI>> { ... } }
This is supported on crate feature aio only.
Expand description

DDL queries that can be run on async socket connections

Provided methods

This function switches to the provided entity.

This is equivalent to:

USE <entity>
Example
use skytable::ddl::Ddl;
use skytable::sync::Connection;

let mut con = Connection::new("127.0.0.1", 2003).unwrap();
con.switch("mykeyspace:mytable").unwrap();

Create the provided keyspace

This is equivalent to:

CREATE KEYSPACE <ksname>

This will return true if the keyspace was created or false if the keyspace already exists

Create a table from the provided configuration

Drop the provided table

This returns true if the table was removed for false if the table didn’t exist

Drop the provided keyspace

Check what keyspace this connection is currently connected to

Implementors