@@ -1997,8 +1997,7 @@ SQLRETURN SQLExecuteMany_wrap(const SqlHandlePtr statementHandle,
19971997 const std::wstring& query,
19981998 const py::list& columnwise_params,
19991999 const std::vector<ParamInfo>& paramInfos,
2000- size_t paramSetSize)
2001- {
2000+ size_t paramSetSize) {
20022001 SQLHANDLE hStmt = statementHandle->get ();
20032002 SQLWCHAR* queryPtr;
20042003
@@ -2008,22 +2007,17 @@ SQLRETURN SQLExecuteMany_wrap(const SqlHandlePtr statementHandle,
20082007#else
20092008 queryPtr = const_cast <SQLWCHAR*>(query.c_str ());
20102009#endif
2011-
20122010 RETCODE rc = SQLPrepare_ptr (hStmt, queryPtr, SQL_NTS);
20132011 if (!SQL_SUCCEEDED (rc)) return rc;
20142012
2015- // Check if any param is DAE/streaming
20162013 bool hasDAE = false ;
20172014 for (const auto & p : paramInfos) {
20182015 if (p.isDAE ) {
20192016 hasDAE = true ;
20202017 break ;
20212018 }
20222019 }
2023-
20242020 if (!hasDAE) {
2025- LOG (" No DAE parameters detected. Proceeding with fast array execution." );
2026- // Fast path: no streaming, bind entire array
20272021 std::vector<std::shared_ptr<void >> paramBuffers;
20282022 rc = BindParameterArray (hStmt, columnwise_params, paramInfos, paramSetSize, paramBuffers);
20292023 if (!SQL_SUCCEEDED (rc)) return rc;
@@ -2034,8 +2028,6 @@ SQLRETURN SQLExecuteMany_wrap(const SqlHandlePtr statementHandle,
20342028 rc = SQLExecute_ptr (hStmt);
20352029 return rc;
20362030 } else {
2037- LOG (" DAE parameters detected. Falling back to row-by-row execution with streaming." );
2038- // Fallback: row-by-row execution with streaming
20392031 size_t rowCount = columnwise_params.size ();
20402032 for (size_t rowIndex = 0 ; rowIndex < rowCount; ++rowIndex) {
20412033 py::list rowParams = columnwise_params[rowIndex];
@@ -2045,8 +2037,6 @@ SQLRETURN SQLExecuteMany_wrap(const SqlHandlePtr statementHandle,
20452037 if (!SQL_SUCCEEDED (rc)) return rc;
20462038
20472039 rc = SQLExecute_ptr (hStmt);
2048-
2049- // Handle DAE streaming
20502040 while (rc == SQL_NEED_DATA) {
20512041 SQLPOINTER token;
20522042 rc = SQLParamData_ptr (hStmt, &token);
@@ -2055,7 +2045,6 @@ SQLRETURN SQLExecuteMany_wrap(const SqlHandlePtr statementHandle,
20552045 py::object* py_obj_ptr = reinterpret_cast <py::object*>(token);
20562046 if (!py_obj_ptr) return SQL_ERROR;
20572047
2058- // Support string/binary streaming
20592048 if (py::isinstance<py::str>(*py_obj_ptr)) {
20602049 std::string data = py_obj_ptr->cast <std::string>();
20612050 SQLLEN data_len = static_cast <SQLLEN>(data.size ());
0 commit comments