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

DDL queries that can be run on a sync 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