CDRS-async - async Apache Cassandra and Scylla driver for Rust

CDRS - Apache Cassandra driver

CDRS-async is an asynchronous driver for Apache Cassandra and Scylla databases.

It's still alpha but you can try it out.

Features

Getting started

Add CDRS-async to your Cargo.toml file as a dependency:

toml cdrs-async = { version = "*" }

Then add it as an external crate to your main.rs file:

```rust extern crate asyncstd; extern crate asynctrait; extern crate cdrs_async;

use asyncstd::{pin::Pin, task}; use cdrsasync::{authenticators::NoneAuthenticator, query::QueryExecutor, Compression, Session};

const CREATEKSQUERY: &'static str = r#" CREATE KEYSPACE IF NOT EXISTS asynccdrs3 WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }; "#;

fn main() { task::blockon(async { let authenticatorstrategy = NoneAuthenticator {}; let mut session = Session::connect( "127.0.0.1:9042", Compression::None, authenticatorstrategy.into(), ) .await .expect("session connect"); let pinnedsession = Pin::new(&mut session);

let r = pinned_session.query(CREATE_KS_QUERY).await;
println!("Result {:?}", r);

}); } ```

License

This project is licensed under either of