Rust driver for Siodb
A simple driver for Siodb written in pure Rust.
Features
- Support of URI
- Connections to Siodb (TLS, TCP, Unix socket)
- Authentication to Siodb
- Query execution
- DML execution
Installation
Add the crate dependency with the version you desire into Cargo.toml
:
[dependencies]
siodb = "*"
Quick setup
Start Siodb in a container and get the RSA key for root user locally:
Example
let uri = "siodbs://root@localhost:50000?identity_file=/home/nico/root_id_rsa";
let mut siodb_conn = new.expect;
if siodb_conn
.query_row
.is_none
if siodb_conn
.query_row
.is_none
siodb_conn
.execute
.expect;
println!;
siodb_conn
.query
.expect;
while siodb_conn.next.unwrap
println!;
siodb_conn.close.unwrap;
URI
To identify a Siodb resource, the driver use the URI format.
For TLS connection (default):
siodbs://root@localhost:50000?identity_file=/home/siodb/.ssh/id_rsa
For TCP plain text connection:
siodb://root@localhost?identity_file=/home/siodb/.ssh/id_rsa
For Unix socket connection:
siodbu://root@localhost?identity_file=/home/siodb/.ssh/id_rsa
The above example will connect you to the localhost with port number 50000
.
The driver will do the authentication with the Siodb user root and the identity file /home/siodb/.ssh/id_rsa
.
Options
- identity_file: the path to the RSA private key.
- unix_socket: indicate the path of the Unix socket used by Siodb to connect locally.
- trace: to trace everything within the driver to sdtout.
Support Siodb
Do you like this project? Tell it by clicking the star 🟊 on the top right of this page ☝☝
Documentation
We write the Siodb documentation in Markdow and it is available in the folder docs/users/docs
.
If you prefer a more user friendly format, the same documentation is
available online here.
Contribution
Please refer to the Contributing file.
Support
- Report your issue with Siodb 👉 here.
- Report your issue with the driver 👉 here.
- Ask a question 👉 here.
- Siodb Slack space 👉 here.
Follow Siodb
License
Licensed under Apache License version 2.0.