Xuanwo commented on code in PR #6963:
URL: https://github.com/apache/opendal/pull/6963#discussion_r2609816713


##########
opendal-services/src/backend.rs:
##########
@@ -34,74 +36,43 @@ pub struct MongodbBuilder {
 }
 
 impl MongodbBuilder {
-    /// Set the connection_string of the MongoDB service.
-    ///
-    /// This connection string is used to connect to the MongoDB service. It 
typically follows the format:
-    ///
-    /// ## Format
-    ///
-    /// 
`mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]`
-    ///
-    /// Examples:
-    ///
-    /// - Connecting to a local MongoDB instance: `mongodb://localhost:27017`
-    /// - Using authentication: 
`mongodb://myUser:myPassword@localhost:27017/myAuthDB`
-    /// - Specifying authentication mechanism: 
`mongodb://myUser:myPassword@localhost:27017/myAuthDB?authMechanism=SCRAM-SHA-256`
-    ///
-    /// ## Options
-    ///
-    /// - `authMechanism`: Specifies the authentication method to use. 
Examples include `SCRAM-SHA-1`, `SCRAM-SHA-256`, and `MONGODB-AWS`.
-    /// - ... (any other options you wish to highlight)
-    ///
-    /// For more information, please refer to [MongoDB Connection String URI 
Format](https://docs.mongodb.com/manual/reference/connection-string/).
     pub fn connection_string(mut self, v: &str) -> Self {
         if !v.is_empty() {
             self.config.connection_string = Some(v.to_string());
         }
         self
     }
-    /// Set the working directory, all operations will be performed under it.

Review Comment:
   The same



##########
opendal-services/mongodb/Cargo.toml:
##########
@@ -0,0 +1,19 @@
+[package]
+name = "opendal-services-mongodb"

Review Comment:
   Hi, package name should be `opendal-service-mongodb`



##########
opendal-services/mongodb/Cargo.toml:
##########
@@ -0,0 +1,19 @@
+[package]
+name = "opendal-services-mongodb"
+version = "0.1.0"

Review Comment:
   version should align with other crates.



##########
opendal-services/src/backend.rs:
##########
@@ -139,21 +112,27 @@ impl Builder for MongodbBuilder {
                 );
             }
         };
-        let key_field = match &self.config.key_field.clone() {
-            Some(v) => v.clone(),
-            None => "key".to_string(),
-        };
-        let value_field = match &self.config.value_field.clone() {
-            Some(v) => v.clone(),
-            None => "value".to_string(),
-        };
+

Review Comment:
   Please don't introduce not related changes.



##########
opendal-services/src/backend.rs:
##########
@@ -34,74 +36,43 @@ pub struct MongodbBuilder {
 }
 
 impl MongodbBuilder {
-    /// Set the connection_string of the MongoDB service.

Review Comment:
   Why remove those code? I expect all exist code not changed.



##########
opendal-services/src/writer.rs:
##########
@@ -15,21 +15,18 @@
 // specific language governing permissions and limitations
 // under the License.
 
-/// Default scheme for mysql service.
-pub const MYSQL_SCHEME: &str = "mysql";
+/// Default scheme for mongodb service.
+pub const MONGODB_SCHEME: &str = "mongodb";
+
 
-use opendal_core::DEFAULT_OPERATOR_REGISTRY;
 
 mod backend;
 mod config;
 mod core;
 mod deleter;
 mod writer;
 
-pub use backend::MysqlBuilder as Mysql;
-pub use config::MysqlConfig;
+pub use backend::MongodbBuilder as Mongodb;
+pub use config::MongodbConfig;
+
 

Review Comment:
   This is critical for our register logic.



##########
opendal-services/mongodb/Cargo.toml:
##########
@@ -0,0 +1,19 @@
+[package]
+name = "opendal-services-mongodb"
+version = "0.1.0"
+edition = "2021"

Review Comment:
   We should use `2024` edition



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to