40 releases

new 0.8.7 Apr 24, 2024
0.8.6 Jan 26, 2024
0.8.2 Dec 6, 2023
0.7.5 May 24, 2023
0.4.0 Jun 27, 2021

#857 in Database interfaces

Download history 7/week @ 2023-12-30 51/week @ 2024-01-06 19/week @ 2024-01-13 4/week @ 2024-01-20 1/week @ 2024-01-27 1/week @ 2024-02-10 25/week @ 2024-02-17 142/week @ 2024-02-24 19/week @ 2024-03-02 454/week @ 2024-03-09 39/week @ 2024-03-16 4/week @ 2024-03-23 68/week @ 2024-03-30 15/week @ 2024-04-06 10/week @ 2024-04-13

99 downloads per month
Used in 2 crates

Apache-2.0

100KB
2K SLoC

Skytable client Crates.io Test docs.rs GitHub release (latest SemVer including pre-releases)

Introduction

This library is the official client for the free and open-source NoSQL database Skytable. First, go ahead and install Skytable by following the instructions here. This library supports all Skytable versions that work with the Skyhash 2 Protocol. This version of the library was tested with the latest Skytable release (release 0.8.1). Read more about supported versions here.

Definitive example

This library only ships with the bare minimum that is required for interacting with Skytable. Once you have Skytable installed and running, you're ready to follow this guide!

We'll start by creating a new binary application and then running actions. Create a new binary application by running:

cargo new skyapp

Tip: You can see a full list of the available actions here.

First add this to your Cargo.toml file:

skytable = "0.8"

You're ready to go!

use skytable::{Query, Response, Config, query};

#[derive(Query, Response)]
#[derive(Clone, PartialEq, Debug)] // we just do these for the assert (they are not needed)
struct User {
    userid: String,
    pass: String,
    followers: u64,
    email: Option<String>
}

let our_user = User { userid: "user".into(), pass: "pass".into(), followers: 120, email: None };

let mut db = Config::new_default("username", "password").connect().unwrap();

// insert data
let q = query!("insert into myspace.mymodel(?, ?, ?, ?)", our_user.clone());
db.query_parse::<()>(&q).unwrap();

// select data
let user: User = db.query_parse(&query!("select * from myspace.mymodel where username = ?", &our_user.userid)).unwrap();
assert_eq!(user, our_user);

Read docs here to learn BlueQL

Version support

  • Minimum Supported Rust Version (MSRV): 1.51.0
  • Minimum Supported Skytable Version: 0.8.0

Features

  • Sync API
  • Async API
  • TLS in both sync/async APIs
  • Connection pooling for sync/async
  • Use both sync/async APIs at the same time
  • Always up-to-date

Contributing

Contributions are always welcome. To submit patches please fork this repository and submit a pull request. If you find any bugs, please open an issue here.

License

This library is distributed under the Apache-2.0 License.

Dependencies

~4–16MB
~185K SLoC