5 configuration options · available in Rust, Python, Node.js, Java
use opendal::Operator;
let op = Operator::via_iter("sqlite", [
])?;
use opendal::Operator;
let op = Operator::via_iter("sqlite", [
// Set the connection_string of the sqlite service.
//
// This connection string is used to connect to the sqlite service.
//
// The format of connect string resembles the url format of the sqlite client:
//
// - `sqlite::memory:`
// - `sqlite:data.db`
// - `sqlite://data.db`
//
// For more information, please visit <https://docs.rs/sqlx/latest/sqlx/sqlite/struct.SqliteConnectOptions.html>.
// ("connection_string".to_string(), "...".to_string()),
// Set the table name of the sqlite service to read/write.
// ("table".to_string(), "...".to_string()),
// Set the key field name of the sqlite service to read/write.
//
// Default to `key` if not specified.
// ("key_field".to_string(), "...".to_string()),
// Set the value field name of the sqlite service to read/write.
//
// Default to `value` if not specified.
// ("value_field".to_string(), "...".to_string()),
// set the working directory, all operations will be performed under it.
//
// default: "/"
// ("root".to_string(), "...".to_string()),
])?;
Every option is passed as a string key; OpenDAL parses it into the right type. Some services may require building the binding with the matching services-* feature enabled.
| Key | Type | Required | Description |
|---|---|---|---|
connection_string | string | no | Set the connection_string of the sqlite service.
This connection string is used to connect to the sqlite service.
The format of connect string resembles the url format of the sqlite client:
- sqlite::memory:
- sqlite:data.db
- sqlite://data.db
For more information, please visit <https://docs.rs/sqlx/latest/sqlx/sqlite/struct.SqliteConnectOptions.html>. |
table | string | no | Set the table name of the sqlite service to read/write. |
key_field | string | no | Set the key field name of the sqlite service to read/write.
Default to key if not specified. |
value_field | string | no | Set the value field name of the sqlite service to read/write.
Default to value if not specified. |
root | string | no | set the working directory, all operations will be performed under it. default: "/" |