kou commented on code in PR #40939:
URL: https://github.com/apache/arrow/pull/40939#discussion_r2085798413


##########
cpp/src/arrow/flight/sql/odbc/flight_sql/flight_sql_connection.cc:
##########
@@ -0,0 +1,464 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "arrow/flight/sql/odbc/flight_sql/flight_sql_connection.h"
+
+#include 
"arrow/flight/sql/odbc/odbcabstraction/include/odbcabstraction/platform.h"
+#include 
"arrow/flight/sql/odbc/odbcabstraction/include/odbcabstraction/utils.h"
+
+#include "arrow/flight/client_cookie_middleware.h"
+#include "arrow/flight/sql/odbc/flight_sql/address_info.h"
+#include "arrow/flight/sql/odbc/flight_sql/flight_sql_auth_method.h"
+#include "arrow/flight/sql/odbc/flight_sql/flight_sql_ssl_config.h"
+#include "arrow/flight/sql/odbc/flight_sql/flight_sql_statement.h"
+#include "arrow/flight/sql/odbc/flight_sql/utils.h"
+#include "arrow/flight/types.h"
+
+#include <boost/algorithm/string.hpp>
+#include <boost/algorithm/string/join.hpp>
+#include <boost/asio/ip/address.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/optional.hpp>
+#include 
"arrow/flight/sql/odbc/odbcabstraction/include/odbcabstraction/exceptions.h"
+
+#include <sql.h>
+#include <sqlext.h>
+
+#include "arrow/flight/sql/odbc/flight_sql/system_trust_store.h"
+
+#ifndef NI_MAXHOST
+#  define NI_MAXHOST 1025
+#endif
+
+namespace driver {
+namespace flight_sql {
+
+using arrow::Result;
+using arrow::Status;
+using arrow::flight::FlightCallOptions;
+using arrow::flight::FlightClient;
+using arrow::flight::FlightClientOptions;
+using arrow::flight::Location;
+using arrow::flight::TimeoutDuration;
+using arrow::flight::sql::FlightSqlClient;
+using driver::odbcabstraction::AsBool;
+using driver::odbcabstraction::CommunicationException;
+using driver::odbcabstraction::Connection;
+using driver::odbcabstraction::DriverException;
+using driver::odbcabstraction::OdbcVersion;
+using driver::odbcabstraction::Statement;
+
+// clang-format off
+const std::string FlightSqlConnection::DSN = "dsn";            // 
NOLINT(runtime/string)
+const std::string FlightSqlConnection::DRIVER = "driver";      // 
NOLINT(runtime/string)
+const std::string FlightSqlConnection::HOST = "host";          // 
NOLINT(runtime/string)
+const std::string FlightSqlConnection::PORT = "port";          // 
NOLINT(runtime/string)
+const std::string FlightSqlConnection::USER = "user";          // 
NOLINT(runtime/string)
+const std::string FlightSqlConnection::USER_ID = "user id";    // 
NOLINT(runtime/string)
+const std::string FlightSqlConnection::UID = "uid";            // 
NOLINT(runtime/string)
+const std::string FlightSqlConnection::PASSWORD = "password";  // 
NOLINT(runtime/string)
+const std::string FlightSqlConnection::PWD = "pwd";            // 
NOLINT(runtime/string)
+const std::string FlightSqlConnection::TOKEN = "token";        // 
NOLINT(runtime/string)
+const std::string FlightSqlConnection::USE_ENCRYPTION =        // 
NOLINT(runtime/string)
+    "useEncryption";
+const std::string FlightSqlConnection::DISABLE_CERTIFICATE_VERIFICATION = // 
NOLINT
+    "disableCertificateVerification";
+const std::string FlightSqlConnection::TRUSTED_CERTS =         // 
NOLINT(runtime/string)
+    "trustedCerts";
+const std::string FlightSqlConnection::USE_SYSTEM_TRUST_STORE = // 
NOLINT(runtime/string)
+    "useSystemTrustStore";
+const std::string FlightSqlConnection::STRING_COLUMN_LENGTH =  // 
NOLINT(runtime/string)
+    "StringColumnLength";
+const std::string FlightSqlConnection::USE_WIDE_CHAR =         // 
NOLINT(runtime/string)
+    "UseWideChar";
+const std::string FlightSqlConnection::CHUNK_BUFFER_CAPACITY = // 
NOLINT(runtime/string)
+    "ChunkBufferCapacity";
+// clang-format on
+

Review Comment:
   Can we use `constexpr std::string_view` instead of `const std::string 
NOLINT`?



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to