Install
You need to have rqlite installed on your system.
Usage
A simple Cargo dependency would look like this :
[]
= { = "0.1" }
= { = "0.7" , = false, = ["macros", "runtime-tokio", "tls-none"] }
= { = "1", = [ "full" ] }
Assuming an rqlite node listens at "127.0.0.1:4001", a simple app would proceed as follows:
use StreamExt;
use *;
use RqlitePoolOptions;
//#[async_std::main] // Requires the `attributes` feature of `async-std`
// or #[actix_web::main]
async
To get "datetime" support, you need to enable the feature "chrono".
Security
For a secured connection, use:
let pool = new
//.max_connections(5)
.connect
.await?;
⚠️ DANGER In case you opt in for an insecure ssl connection (which accepts invalid certificates), use:
let pool = new
//.max_connections(5)
.connect
.await?;
License
Licensed under
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) .
Contribution
Unless you explicitly state otherwise, any Contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.