Skip to main content

mongodb

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

Quick start
use opendal::Operator;

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

let op = Operator::via_iter("mongodb", [
// connection string of this backend
// ("connection_string".to_string(), "...".to_string()),

// database of this backend
// ("database".to_string(), "...".to_string()),

// collection of this backend
// ("collection".to_string(), "...".to_string()),

// root of this backend
// ("root".to_string(), "...".to_string()),

// key field of this backend
// ("key_field".to_string(), "...".to_string()),

// value field of this backend
// ("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

General6
KeyTypeRequiredDescription
connection_stringstringnoconnection string of this backend
databasestringnodatabase of this backend
collectionstringnocollection of this backend
rootstringnoroot of this backend
key_fieldstringnokey field of this backend
value_fieldstringnovalue field of this backend