Skip to content

SQL-2543: prepare to build both in one shot #323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ windows = { version = "0.44.0", features = [

[features]
garbage_collect = []
eap = []

[lib]
name = "mongo_odbc_core"
Expand Down
20 changes: 19 additions & 1 deletion core/src/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,33 @@ impl MongoConnection {

let type_of_cluster = runtime.block_on(async { determine_cluster_type(&client).await })?;
match type_of_cluster {
MongoClusterType::AtlasDataFederation | MongoClusterType::Enterprise => {}
MongoClusterType::AtlasDataFederation => {}
MongoClusterType::Enterprise => {
#[cfg(not(feature = "eap"))]
return Err(Error::UnsupportedClusterConfiguration(
"Unsupported cluster type. The driver is intended for use with MongoDB Atlas Data Federation."
.to_string(),
));
}
MongoClusterType::Community => {
// Community edition is not supported
#[cfg(not(feature = "eap"))]
return Err(Error::UnsupportedClusterConfiguration(
"Community edition detected. The driver is intended for use with MongoDB Atlas Data Federation."
.to_string(),
));
#[cfg(feature = "eap")]
return Err(Error::UnsupportedClusterConfiguration(
"Community edition detected. The driver is intended for use with MongoDB Enterprise edition or Atlas Data Federation.".to_string(),
));
}
MongoClusterType::UnknownTarget => {
// Unknown cluster type is not supported
#[cfg(not(feature = "eap"))]
return Err(Error::UnsupportedClusterConfiguration(
"Unknown cluster/target type detected. The driver is intendended for use with MongoDB Atlas Data Federation".to_string(),
));
#[cfg(feature = "eap")]
return Err(Error::UnsupportedClusterConfiguration(
"Unknown cluster/target type detected. The driver is intended for use with MongoDB Enterprise edition or Atlas Data Federation.".to_string(),
));
Expand Down
Loading