AlexPikalov / Cdrs
Licence: other
Cassandra DB native client written in Rust language. Find 1.x versions on https://github.com/AlexPikalov/cdrs/tree/v.1.x Looking for an async version? - Check WIP https://github.com/AlexPikalov/cdrs-async
Stars: ✭ 314
Programming Languages
rust
11053 projects
Projects that are alternatives of or similar to Cdrs
Csharp Driver
DataStax C# Driver for Apache Cassandra
Stars: ✭ 477 (+51.91%)
Mutual labels: database, cassandra, driver, client
Gocql
Package gocql implements a fast and robust Cassandra client for the Go programming language.
Stars: ✭ 2,182 (+594.9%)
Mutual labels: database, cassandra, driver, client
Nodejs Driver
DataStax Node.js Driver for Apache Cassandra
Stars: ✭ 1,074 (+242.04%)
Mutual labels: database, cassandra, driver, client
Faunadb Jvm
Scala and Java driver for FaunaDB
Stars: ✭ 50 (-84.08%)
Mutual labels: database, driver, client
Postgres
Postgres.js - The Fastest full featured PostgreSQL client for Node.js
Stars: ✭ 2,193 (+598.41%)
Mutual labels: database, driver, client
Faunadb Python
Python driver for FaunaDB
Stars: ✭ 75 (-76.11%)
Mutual labels: database, driver, client
Faunadb Js
Javascript driver for FaunaDB
Stars: ✭ 498 (+58.6%)
Mutual labels: database, driver, client
Biota
A simple database framework for Fauna
Stars: ✭ 54 (-82.8%)
Mutual labels: database, driver, client
Quill
Compile-time Language Integrated Queries for Scala
Stars: ✭ 1,998 (+536.31%)
Mutual labels: database, cassandra
Arangodb Java Driver
The official ArangoDB Java driver.
Stars: ✭ 174 (-44.59%)
Mutual labels: database, driver
Druidry
Java based Druid Query Generator library
Stars: ✭ 174 (-44.59%)
Mutual labels: database, client
Migrate
Database migrations. CLI and Golang library.
Stars: ✭ 2,315 (+637.26%)
Mutual labels: database, cassandra
cdrs-tokio
High-level async Cassandra client written in 100% Rust.
Stars: ✭ 54 (-82.8%)
Mutual labels: cassandra, driver
Dbbench
🏋️ dbbench is a simple database benchmarking tool which supports several databases and own scripts
Stars: ✭ 52 (-83.44%)
Mutual labels: database, cassandra
CDRS is looking for maintainers
CDRS is Apache Cassandra driver written in pure Rust.
💡Looking for an async version?
- async-std https://github.com/AlexPikalov/cdrs-async (API is not fully compatible with https://github.com/AlexPikalov/cdrs)
- tokio https://github.com/AlexPikalov/cdrs/tree/async-tokio
Features
- TCP/SSL connection;
- Load balancing;
- Connection pooling;
- LZ4, Snappy compression;
- Cassandra-to-Rust data deserialization;
- Pluggable authentication strategies;
- ScyllaDB support;
- Server events listening;
- Multiple CQL version support (3, 4), full spec implementation;
- Query tracing information.
Documentation and examples
- User guide.
- Examples.
- API docs (release).
- Using ScyllaDB with RUST lesson.
Getting started
Add CDRS to your Cargo.toml
file as a dependency:
cdrs = { version = "2" }
Then add it as an external crate to your main.rs
:
extern crate cdrs;
use cdrs::authenticators::NoneAuthenticator;
use cdrs::cluster::session::{new as new_session};
use cdrs::cluster::{ClusterTcpConfig, NodeTcpConfigBuilder};
use cdrs::load_balancing::RoundRobin;
use cdrs::query::*;
fn main() {
let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
let cluster_config = ClusterTcpConfig(vec![node]);
let no_compression =
new_session(&cluster_config, RoundRobin::new()).expect("session should be created");
let create_ks: &'static str = "CREATE KEYSPACE IF NOT EXISTS test_ks WITH REPLICATION = { \
'class' : 'SimpleStrategy', 'replication_factor' : 1 };";
no_compression.query(create_ks).expect("Keyspace create error");
}
This example configures a cluster consisting of a single node, and uses round robin load balancing and default r2d2
values for connection pool.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].