Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
liugddx committed Sep 1, 2024
1 parent f2f8082 commit 5c65a36
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions core/src/services/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,6 @@ pub use webhdfs::*;

mod yandex_disk;
pub use yandex_disk::*;

mod lakefs;
pub use lakefs::*;
2 changes: 2 additions & 0 deletions core/src/types/operator/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ impl Operator {
Scheme::Mongodb => Self::from_iter::<services::Mongodb>(iter)?.finish(),
#[cfg(feature = "services-hdfs-native")]
Scheme::HdfsNative => Self::from_iter::<services::HdfsNative>(iter)?.finish(),
#[cfg(feature = "services-lakefs")]
Scheme::Lakefs => Self::from_iter::<services::Lakefs>(iter)?.finish(),
v => {
return Err(Error::new(
ErrorKind::Unsupported,
Expand Down
6 changes: 6 additions & 0 deletions core/src/types/scheme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ pub enum Scheme {
HdfsNative,
/// [surrealdb](crate::services::Surrealdb): Surrealdb Services
Surrealdb,
/// [lakefs](crate::services::Lakefs): LakeFS Services
Lakefs,
/// Custom that allow users to implement services outside of OpenDAL.
///
/// # NOTE
Expand Down Expand Up @@ -311,6 +313,8 @@ impl Scheme {
Scheme::HdfsNative,
#[cfg(feature = "services-surrealdb")]
Scheme::Surrealdb,
#[cfg(feature = "services-lakefs")]
Scheme::Lakefs,
])
}
}
Expand Down Expand Up @@ -401,6 +405,7 @@ impl FromStr for Scheme {
"mongodb" => Ok(Scheme::Mongodb),
"hdfs_native" => Ok(Scheme::HdfsNative),
"surrealdb" => Ok(Scheme::Surrealdb),
"lakefs" => Ok(Scheme::Lakefs),
_ => Ok(Scheme::Custom(Box::leak(s.into_boxed_str()))),
}
}
Expand Down Expand Up @@ -474,6 +479,7 @@ impl From<Scheme> for &'static str {
Scheme::Pcloud => "pcloud",
Scheme::HdfsNative => "hdfs_native",
Scheme::Surrealdb => "surrealdb",
Scheme::Lakefs => "lakefs",
Scheme::Custom(v) => v,
}
}
Expand Down

0 comments on commit 5c65a36

Please sign in to comment.