Skip to main content

sqlite

5 configuration options · available in Rust, Python, Node.js, Java

Quick start
use opendal::Operator;

let op = Operator::via_iter("sqlite", [
])?;
All configuration options (copy & trim)
Full reference
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.

Configuration reference

General5
KeyTypeRequiredDescription
connection_stringstringnoSet 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>.
tablestringnoSet the table name of the sqlite service to read/write.
key_fieldstringnoSet the key field name of the sqlite service to read/write. Default to key if not specified.
value_fieldstringnoSet the value field name of the sqlite service to read/write. Default to value if not specified.
rootstringnoset the working directory, all operations will be performed under it. default: "/"