Skip to content

Commit

Permalink
Simplify logic, remove tertiary
Browse files Browse the repository at this point in the history
Signed-off-by: currantw <taylor.curran@improving.com>
  • Loading branch information
currantw committed Nov 20, 2024
1 parent 8e2f718 commit bed6886
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/sqlodbc/opensearch_communication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1105,11 +1105,9 @@ void OpenSearchCommunication::SetSqlEndpoint() {
*/
void OpenSearchCommunication::SetIsAossServerless() {

// Try to determine whether this connects to Serverless by parsing the
// server URL, otherwise use the configuration option, which defaults
// to false if not provided.
// Treat the connection as serverless if the configuration option is true
// or the server URL corresponds to Amazon OpenSearch Serverless.
is_aoss_serverless =
( m_rt_opts.conn.server.find("aoss.amazonaws.com") != std::string::npos )
? true
: m_rt_opts.conn.is_aoss_serverless;
m_rt_opts.conn.is_aoss_serverless ||
( m_rt_opts.conn.server.find("aoss.amazonaws.com") != std::string::npos );
}

0 comments on commit bed6886

Please sign in to comment.