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_driver = "*"
Example
URI
To identify a Siodb resource, the driver use the URI format.
For TCP connection:
siodb://root@localhost:50000?identity_file=/home/siodb/.ssh/id_rsa
For Unix socket connection:
siodb://root@unix_socket?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.
- plaintext: if Siodb has
client.enable_encryption
set tono
.
License
Licensed under Apache License version 2.0.