Skip to main content

d1

7 configuration options · available in Rust, Python

Quick start
use opendal::Operator;

let op = Operator::via_iter("d1", [
])?;
All configuration options (copy & trim)
Full reference
use opendal::Operator;

let op = Operator::via_iter("d1", [
// Set the token of cloudflare api.
// ("token".to_string(), "...".to_string()),

// Set the account id of cloudflare api.
// ("account_id".to_string(), "...".to_string()),

// Set the database id of cloudflare api.
// ("database_id".to_string(), "...".to_string()),

// Set the working directory of OpenDAL.
// ("root".to_string(), "...".to_string()),

// Set the table of D1 Database.
// ("table".to_string(), "...".to_string()),

// Set the key field of D1 Database.
// ("key_field".to_string(), "...".to_string()),

// Set the value field of D1 Database.
// ("value_field".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

General7
KeyTypeRequiredDescription
tokenstringnoSet the token of cloudflare api.
account_idstringnoSet the account id of cloudflare api.
database_idstringnoSet the database id of cloudflare api.
rootstringnoSet the working directory of OpenDAL.
tablestringnoSet the table of D1 Database.
key_fieldstringnoSet the key field of D1 Database.
value_fieldstringnoSet the value field of D1 Database.