Skip to content

Commit

Permalink
Add constant for OpenSearch distribution.
Browse files Browse the repository at this point in the history
Signed-off-by: currantw <[email protected]>
  • Loading branch information
currantw committed Nov 19, 2024
1 parent ec3386a commit caf9d39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sqlodbc/opensearch_communication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ static const std::string CREDENTIALS_PROFILE = "opensearchodbc";
static const std::string CREDENTIALS_PROVIDER_ALLOCATION_TAG =
"CREDENTIAL_PROVIDER";

static const std::string DISTRIBUTION_OPENSEARCH = "opensearch";

static const std::string ctype = "application/json";
static const std::string ERROR_MSG_PREFIX =
"[OpenSearch][SQL ODBC Driver][SQL Plugin] ";
Expand Down Expand Up @@ -1090,7 +1092,7 @@ void OpenSearchCommunication::SetSqlEndpoint() {
std::string distribution = GetServerDistribution();
if (distribution.empty()) {
sql_endpoint = SQL_ENDPOINT_ERROR;
} else if (distribution == "opensearch") {
} else if (distribution == DISTRIBUTION_OPENSEARCH) {
sql_endpoint = SQL_ENDPOINT_OPENSEARCH;
} else {
sql_endpoint = SQL_ENDPOINT_ELASTICSEARCH;
Expand Down

0 comments on commit caf9d39

Please sign in to comment.